15.10.2012, 09:30
Hello,i got this score check for every vehicles, means if you dont have the required score, you can't drive a certain vehicle.It works but there is a problem, even if i have the required score, it keeps saying "You need XX score etc" but i can drive it.
Any tip?
Any tip?
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(GetVehicleModel(vehicleid) == 520) //Hydra
{
if(GetPlayerScore(playerid) <= 1500) RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,0xAA3333AA,"You need 1500 score to drive this Hydra.");
return 1;
}
if(GetVehicleModel(vehicleid) == 432) //Rhino
{
if(GetPlayerScore(playerid) <= 300) RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,0xAA3333AA,"You need 300 score to drive this Rhino.");
return 1;
}
if(GetVehicleModel(vehicleid) == 425) //Hunter
{
if(GetPlayerScore(playerid) <= 1000) RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,0xAA3333AA,"You need 1000 score to drive this Hunter.");
return 1;
}
else return 1;
}