Jump to content

C# need assistance with scripting


Recommended Posts

ShadowCoderKing

hi im learning c# and im gonna use this thread for all my questions and problems

 

how do i delete a marker after using this code ?

World.DrawMarker(MarkerType.VerticleCircle, new Vector3(-1555.143f, 2773.796f, 16.50302f), Vector3.Zero, Vector3.Zero, new Vector3(1f, 1f, 1f), System.Drawing.Color.Red);

I tried adding this to the start of the code so i can use MarkerStart1.remove() but it comes up with an error

World MarkerStart1 = 
Edited by SpiderMight
Link to comment
https://gtaforums.com/topic/887899-c-need-assistance-with-scripting/
Share on other sites

DrawMarker must be in Ontick();

 

When you want to see the marker use "if" :

if(StartedMod == true){    World.DrawMarker(MarkerType.VerticleCircle, new Vector3(-1555.143f, 2773.796f, 16.50302f), Vector3.Zero, Vector3.Zero, new Vector3(1f, 1f, 1f), System.Drawing.Color.Red);}

And if the mod isn't started, the marker doesn't appear ;)

  • 2 weeks later...
ShadowCoderKing

thanks, how do you make dynamic music play like the wanted level music ect thats already in the game ?

how do you make a ped not bleed on bullet hit ?

also how do you mute a ped so they dont talk, i cant find any code to do it

Edited by SpiderMight
  • 4 weeks later...

thanks, how do you make dynamic music play like the wanted level music ect thats already in the game ?

void PLAY_SOUND_FRONTEND(int soundId, char *audioName, char *audioRef, BOOL p3) // 0x67C540AA08E4A6F5 0x2E458F74

how do you make a ped not bleed on bullet hit ?

 

Not sure about this one but try calling this on every tick:

void CLEAR_PED_BLOOD_DAMAGE(Ped ped) // 0x8FE22675A5A45817 0xF7ADC960
also how do you mute a ped so they dont talk, i cant find any code to do it
void STOP_CURRENT_PLAYING_AMBIENT_SPEECH(Ped ped)// 0xB8BEC0CA6F0EDB0F 0xBB8E64BF

Needs to be called every frame.

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 0 User Currently Viewing
    0 members, 0 Anonymous, 0 Guests

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.