20.12.2016, 15:05
I was scripting my stuff, but it didn't work at all, then I figured and created that but the problem didn't solve at all My Problem Is This:
I use a for loop for checking a variable arrays like this
Now i want to check that if the player's vehicle is from any of the 5 numbers whether 1,2,3 etc but for ex: the player's vehicle id is 3. He will get 3 msgs saying "Not right" because the for loop is in work and if if nest for loop before else statement it will give me error:: Invalid Expression, assumed zero.
I nest like this:
I use a for loop for checking a variable arrays like this
PHP код:
for (new i; i < 5; i++)
{
if(GetPlayerVehicleid(playerid) == i) {
//Some code here
}
else sendclientmessage(playerid, -1, "Not right");
}
I nest like this:
PHP код:
for (new i; i < 5; i++)
{
if(GetPlayerVehicleid(playerid) == i) {
//Some code here
}
} else //some code here