15.12.2012, 08:21
Hello! I got a problem with variable, which I want to add to multiple cars.
Like this:
I hope you will help me, thanks!
Like this:
PHP код:
new Variable[MAX_VEHICLES];
public OnGameModeInIt()
{
Variable[1] = CreateVehicle(....................................);
Variable[2] = CreateVehicle(....................................);
return 1;
}
public OnPlayerStateChange(playerid, oldstate, newstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
if(GetPlayerVehicleID(playerid)==Variable[all the cars with Variable]) // I just want to not write this line with Variable[number, for example - 1] for multiple times, I want this in one line like I wrote under if(newstate == ....)
{
// Function
}
}
}
