13.07.2012, 17:57
Hello,
This code isn't removing me from my car:
When i am not pilot, owner, or engineer.
Is there any reason for this?
Thanks.
This code isn't removing me from my car:
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(vehicleid == 432 && IsEngineer[playerid] != 1 && IsVIP[playerid] != && IsOwner[playerid] != 1)
{
SendClientMessage(playerid, COLOR_RED, "ERROR: You must be an engineer or owner to drive this.");
RemovePlayerFromVehicle(playerid);
}
if(vehicleid == 425 && IsPilot[playerid] != 1 && IsVIP[playerid] != 1 && IsOwner[playerid] != 1)
{
SendClientMessage(playerid, COLOR_RED, "ERROR: You must be a pilot or owner to pilot this.");
RemovePlayerFromVehicle(playerid);
}
if(vehicleid == 447 && IsPilot[playerid] != 1 && IsOwner[playerid] != 1)
{
SendClientMessage(playerid, COLOR_RED, "ERROR: You must be a pilot or owner to pilot this.");
RemovePlayerFromVehicle(playerid);
}
if(vehicleid == 520 && IsPilot[playerid] != 1 && IsOwner[playerid] != 1)
{
SendClientMessage(playerid, COLOR_RED, "ERROR: You must be a pilot or owner to pilot this.");
RemovePlayerFromVehicle(playerid);
}
}
return 1;
}
Is there any reason for this?
Thanks.