Bool variable for vehicle
#1

Hello, how to make a bool variable for a specific vehicle and how to do checks with variables?
Reply
#2

Код:
new bool:variableName[MAX_VEHICLES]; // on top of your script, default is FALSE

//checking boolean
if(variableName[vehicleid] == false) // if boolean equals false
if(variableName[vehicleid] == true) // if boolean equals true

//assigning boolean
variableName[vehicleid] = true; // sets that boolean to true
variableName[vehicleid] = false; // sets that boolean to false

// you should reload the variable (for that vehicle) when the new vehicle is spawned
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)