Kicking low score's from helicopters: Need help
#9

|∞|-Рцппσĵσ-|∞|'s code is good. But I get the feeling that CrucixTM is actually trying to check the vehicle model not the vehicle id. So use this code if you wanted to do that.


pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
new vehid = GetPlayerVehicleID(playerid);
new vehmodel = GetVehicleModel(vehid);
if(vehmodel == 497 || vehmodel == 487 || vehmodel == 563 || vehmodel == 548)
{
if(GetPlayerScore(playerid) < 5)
{
RemovePlayerFromVehicle(playerid);
GameTextForPlayer(playerid, "~r~Removed from Vehicle - Score not high enough",4000,5);
SendClientMessage(playerid, COLOR_RED , "Kicked from vehicle - Score too low. Read /scoreinfo for help.");
return 1;
}
}
}
return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)