OnPlayerStateChange
#4

This will work,rep me + if i helped you

Quote:

public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER && oldstate == PLAYER_STATE_ONFOOT)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid) == 432))
{
if(GetPlayerScore(playerid) < 50))
{ //Line 213
SendClientMessage(playerid, COLOR_RED, "You need to gain 50 score to drive Tanks");
RemovePlayerFromVehicle(playerid);
}
}
if(GetVehicleModel(GetPlayerVehicleID(playerid) == 425))
{
if(GetPlayerScore(playerid) < 30))
{ //Line 221
SendClientMessage(playerid, COLOR_RED, "You need to gain 30 score to pilot Hunters");
RemovePlayerFromVehicle(playerid);
}
}
if(GetVehicleModel(GetPlayerVehicleID(playerid) == 520))
{
if(GetPlayerScore(playerid) < 25))
{ //Line 229
SendClientMessage(playerid, COLOR_RED, "You need to gain 25 score to pilot Hydras");
RemovePlayerFromVehicle(playerid);
}
}
if(GetVehicleModel(GetPlayerVehicleID(playerid) == 447))
{
if(GetPlayerScore(playerid) < 15))
{ //Line 237
SendClientMessage(playerid, COLOR_RED, "You need to gain 15 score to pilot Seasparrows");
RemovePlayerFromVehicle(playerid);
}
}
}
return 1;
}

Reply


Messages In This Thread
OnPlayerStateChange - by stormchaser206 - 06.04.2012, 19:54
Re: OnPlayerStateChange - by GtasaPoliceModz - 06.04.2012, 20:03
Re: OnPlayerStateChange - by TzAkS. - 06.04.2012, 21:01
Re: OnPlayerStateChange - by ivanVU - 06.04.2012, 21:03
Re: OnPlayerStateChange - by 9noober - 25.07.2014, 14:02
Re: OnPlayerStateChange - by ViniBorn - 25.07.2014, 16:21

Forum Jump:


Users browsing this thread: 1 Guest(s)