13.07.2012, 18:07
Quote:
Ah, and again someone who can't differentiate between vehicleids and modelids. Funny.
https://sampwiki.blast.hk/wiki/GetVehicleModel |
Код:
C:\Users\Keegan\Desktop\gamemodes\MWFFA.pwn(401) : error 029: invalid expression, assumed zero C:\Users\Keegan\Desktop\gamemodes\MWFFA.pwn(401) : warning 215: expression has no effect C:\Users\Keegan\Desktop\gamemodes\MWFFA.pwn(401) : error 001: expected token: ";", but found ")" C:\Users\Keegan\Desktop\gamemodes\MWFFA.pwn(401) : error 029: invalid expression, assumed zero C:\Users\Keegan\Desktop\gamemodes\MWFFA.pwn(401) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(GetVehicleModel(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(GetVehicleModel(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(GetVehicleModel(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(GetVehicleModel(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;
}