03.02.2013, 18:23
Quote:
pawn Код:
|
pawn Код:
public OnPlayerStateChange(playerid,newstate,oldstate){
new Veiculo = GetPlayerVehicleID(playerid);
for(new c = 0; c < sizeof CarrosAdm; c++){
if(Veiculo == CarrosAdm[c]){
if(PlayerDados[playerid][Admin] < 1){
RemovePlayerFromVehicle(playerid);
Msg(playerid, CINZA, "Vocк precisa ser admin para usar este Veiculo.");
}
}
}
return 1;
}
@EDIT:
Correto:
pawn Код:
public OnPlayerStateChange(playerid,newstate,oldstate){
new Veiculo = GetPlayerVehicleID(playerid);
if(newstate == PLAYER_STATE_DRIVER){
for(new c = 0; c < sizeof CarrosAdm; c++){
if(Veiculo == CarrosAdm[c]){
if(PlayerDados[playerid][Admin] < 1){
RemovePlayerFromVehicle(playerid);
Msg(playerid, CINZA, "Vocк precisa ser admin para usar este Veiculo.");
}
}
}
}
return 1;
}