07.06.2011, 20:59
OnPlayerEntrerVehicle:
Agora o OnPlayerStateChange:
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(GetVehicleModel(vehicleid) == 562)
{
ShowPlayerDialog(playerid,Infoo+16,DIALOG_STYLE_MSGBOX,".:: DrF - Informaзхes do Carro ::.","~>Que tunar seu carro? Digite: /Tunar\n~>Quer reparar e desvirar seu carro? Digite: /Ajuda","\n ","Fechar");
return 1;
}
SendClientMessage(playerid, 0xAAAAAAAA, ".::[INFO] Este Servidor Possui Sistema Anti-Roubo, Caso Roubar Serб Morto Automaticamente !");
if(!ispassenger && IsVehicleOccupied(vehicleid)) SetPlayerHealth(playerid, 0.0);
return 1;
}
stock IsVehicleOccupied(vehicleid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerInVehicle(i, vehicleid) && GetPlayerState(i) == PLAYER_STATE_DRIVER)
return 1;
return 0;
}
pawn Код:
// Nгo tem o OnPlayerStateChange