Posts: 98
Threads: 30
Joined: Aug 2009
Reputation:
0
For example,I am trying to add nos to vehicles (trying to learn on my own, not use someones pre-made filter scripts thanks anyways though), so I am trying to do this:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if vehicleid=(blah blah all the ids that can't have nos);
do nothing;
else AddVehicleComponent(vehicle, 1010);
}
So is there a way to tell the script not to do anything in that case? Thanks.
Posts: 409
Threads: 40
Joined: May 2009
Reputation:
0
You can also add pickup nos off MTA RACE map editor xD
Posts: 98
Threads: 30
Joined: Aug 2009
Reputation:
0
so let me get this straight.. just to help me learn
just saying if ... without telling pawno to do anything if that is the case is the same as telling it to do nothing?
Thanks btw
Posts: 98
Threads: 30
Joined: Aug 2009
Reputation:
0
Thanks. could be useful in a bunch of different areas
Posts: 98
Threads: 30
Joined: Aug 2009
Reputation:
0
if(vehicleid != (Car ID's that can't have NOS)) AddVehicleComponent(vehicleid, 1010);
I'm guessing that the ! in that equation means "does not equal"
Posts: 98
Threads: 30
Joined: Aug 2009
Reputation:
0
Thanks evolution, that helps a lot. I have one more question though. I am trying to create my own script that deletes a car after u exit it. I am planning on using OnPlayerStateChange, but I don't know what the command is. I mean, what do you call someone that isn't in a vehicle (dont know how better to explain it). I would think it's something like this: "if playerisnotinvehicle(<--thats what i dont know)(DestroyVehicle(vehicleid);"
i hope u know what i mean