03.09.2012, 18:34
hey guys,
im trying to kick someone from his vehicle if he hasnt got the right score for it but it doesnt kicks the person...
ok well here is the code:
can anyone tell me wuts wrong here?
Greets Niels
im trying to kick someone from his vehicle if he hasnt got the right score for it but it doesnt kicks the person...
ok well here is the code:
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER && oldstate == PLAYER_STATE_ONFOOT)
{
if(IsPlayerInVehicle(playerid,GetPlayerVehicleID(playerid) == 520 && (GetPlayerScore(playerid) <= 1000)))
{
RemovePlayerFromVehicle(playerid);
return SendClientMessage(playerid, COLOR_GREEN, "ERROR: you need 1000+ score to enter this vehicle");
}
else if(IsPlayerInVehicle(playerid,GetPlayerVehicleID(playerid) == 432 && (GetPlayerScore(playerid) <= 1000)))
{
RemovePlayerFromVehicle(playerid);
return SendClientMessage(playerid, COLOR_GREEN, "ERROR: you need 1000+ score to enter this vehicle");
}
else if(IsPlayerInVehicle(playerid,GetPlayerVehicleID(playerid) == 476 && (GetPlayerScore(playerid) <= 50)))
{
RemovePlayerFromVehicle(playerid);
return SendClientMessage(playerid, COLOR_GREEN, "ERROR: you need 50+ score to enter this vehicle");
}
else if(IsPlayerInVehicle(playerid,GetPlayerVehicleID(playerid) == 425 && (GetPlayerScore(playerid) <= 1000)))
{
RemovePlayerFromVehicle(playerid);
return SendClientMessage(playerid, COLOR_GREEN, "ERROR: you need 1000+ score to enter this vehicle");
}
}
return 1;
}
Greets Niels