28.03.2010, 06:29
Hi, im making it so if a player has ispolice == 0 it would remove them from the car, but for some reason i get some errors on the last line of this code and not on the others above it, here is the errors and the code
Thanks, [DJ][SF]Зурэ Яииr ∞™ AKA Cody Beer
Код:
C:\Users\Windows Vista\Desktop\sa-mpr6\gamemodes\Cranked.pwn(1491) : error 029: invalid expression, assumed zero C:\Users\Windows Vista\Desktop\sa-mpr6\gamemodes\Cranked.pwn(1491) : warning 215: expression has no effect C:\Users\Windows Vista\Desktop\sa-mpr6\gamemodes\Cranked.pwn(1491) : error 001: expected token: ";", but found "if" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new pveh = GetVehicleModel(GetPlayerVehicleID(playerid));
if(newstate == PLAYER_STATE_DRIVER && (pveh == 596))
{
if(ispolice[playerid] == 0) return RemovePlayerFromVehicle(playerid) || SendClientMessage(playerid, COLOR_RED, "This Car Is Reserved For Police Only Type /jobpolice To Join!");
}
else if(newstate == PLAYER_STATE_DRIVER && (pveh == 523))
{
if(ispolice[playerid] == 0) return RemovePlayerFromVehicle(playerid) || SendClientMessage(playerid, COLOR_RED, "This Car Is Reserved For Police Only Type /jobpolice To Join!");
}
else if(newstate == PLAYER_STATE_DRIVER && (pveh == 601))
{
if(ispolice[playerid] == 0) return RemovePlayerFromVehicle(playerid) || SendClientMessage(playerid, COLOR_RED, "This Car Is Reserved For Police Only Type /jobpolice To Join!");
}
else if(newstate == PLAYER_STATE_DRIVER && (pveh == 427))
{
if(ispolice[playerid] == 0) return RemovePlayerFromVehicle(playerid) || SendClientMessage(playerid, COLOR_RED, "This Car Is Reserved For Police Only Type /jobpolice To Join!");
}
else if(newstate == PLAYER_STATE_DRIVER && (pveh == 490))
{
if(ispolice[playerid] == 0) return RemovePlayerFromVehicle(playerid) || SendClientMessage(playerid, COLOR_RED, "This Car Is Reserved For Police Only Type /jobpolice To Join!");
}
else if(newstate == PLAYER_STATE_DRIVER && (pveh == 599))
{
` if(ispolice[playerid] == 0) return RemovePlayerFromVehicle(playerid) || SendClientMessage(playerid, COLOR_RED, "This Car Is Reserved For Police Only Type /jobpolice To Join!");
}
return 1;
}