07.04.2011, 17:38
Topo do gamemode:
OnGameModeInit:
Public que checa quando alguйm entra no veнculo:
pawn Код:
#define BOPE 0
new Carro;
new Profissao[MAX_PLAYERS];
pawn Код:
Carro= CreateVehicle(ID, Cord:x, Cord:y, Cord:z, Cor1, Cor2, TempoRespawn);
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new Veiculo = GetPlayerVehicleID(playerid);
if(newstate == PLAYER_STATE_DRIVER)
{
if(Veiculo == Carro)
{
if(Profissao[playerid] != BOPE)
{
SendClientMessage(playerid, 0xFFFFFFAA, "[BOPE] Vocк nгo tem autorizaзгo para usar este veнculo!");
RemovePlayerFromVehicle(playerid);
}
}
}
return 1;
}