05.05.2011, 09:59
pawn Код:
new admincar;
admincar = CreateVehicle(modelid, Float:x, Float:y, Float:z, Float:angle, color1, color2, respawn_delay);
public OnPlayerStateChange(playerid,newstate,oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
new PlayerVehicle[playerid] = GetPlayerVehicleID(playerid);
if(Vehicle == admincar)
{
if(pData[ playerid ][ P_LEVEL ] > 0) // change to your admin definition
{
SendClientMessage(playerid, YELLOW, "* Welcome Back Admin!");
} else {
SendClientMessage(playerid, RED, "* You got spooked by the alarm system");
RemovePlayerFromVehicle(playerid);
}
}
}
return 1;
}