07.08.2012, 03:56
Pues bueno, este sistema es para evitar el flood de carros y que los hackers se teletransporten a los carros:
Y cada vez que se use el PutPlayerInVehicle actualizar la variable:
pawn Код:
new Carro[MAX_PLAYERS];
public OnPlayerEnterVehicle(playerid, vehicleid)
{
Carro[playerid] = 1;
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
Carro[playerid] = 0;
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
if(Carro[playerid] == 0)
Kick(playerid)
return 1;
}
Код:
Carro[playerid] = 1;