public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
new Sparrow = GetVehicleModel(GetPlayerVehicleID(playerid));
if(GetPlayerScore(playerid) < 150 && PickedClass[playerid] !=1) {
if(Sparrow == 447) {
SendClientMessage(playerid, COLOR_RED, "ERROR: You need to be LIEUTENANT and ASSAULT to Pilot this vehicle.");
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z); SetPlayerPos(playerid,x,y,z+1);
}
}
new Rhino = GetVehicleModel(GetPlayerVehicleID(playerid));
if(GetPlayerScore(playerid) < 300 && PickedClass[playerid] != 1) {
if(Rhino == 432) {
SendClientMessage(playerid, COLOR_RED, "ERROR: You need to be MAJOR AND Assualt to Pilot this vehicle.");
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z); SetPlayerPos(playerid,x,y,z+1);
}
}
new Hydra = GetVehicleModel(GetPlayerVehicleID(playerid));
if(GetPlayerScore(playerid) < 750 && PickedClass[playerid] != 1) {
if(Hydra == 520) {
SendClientMessage(playerid, COLOR_RED, "ERROR: You need to be COLONEL AND Assualt to Pilot this vehicle.");
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z); SetPlayerPos(playerid,x,y,z+1);
}
}
new Hunter = GetVehicleModel(GetPlayerVehicleID(playerid));
if(GetPlayerScore(playerid) < 750 && PickedClass[playerid] != 1) {
if(Hunter == 425) {
SendClientMessage(playerid, COLOR_RED, "ERROR: You need to be COLONEL AND Assualt to Pilot this vehicle.");
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z); SetPlayerPos(playerid,x,y,z+1);
}
}
|
you need to remove him from vehicle? use RemovePlayerFromVehicle(playerid);
|
new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); SetPlayerPos(playerid,x,y,z+1);