23.12.2009, 14:18
pawn Код:
if(gTeam[playerid] == TEAM_COP);
Whats wrong?
if(gTeam[playerid] == TEAM_COP);
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(newstate == PLAYER_STATE_DRIVER && oldstate == PLAYER_STATE_ONFOOT)
{
if(vehicleid == cruiser1)
{
if(gTeam[playerid] == TEAM_COP);
}
else
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_RED, "This vehicle belongs to the San Fierro Police Department.");
}
}
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(newstate == PLAYER_STATE_DRIVER && oldstate == PLAYER_STATE_ONFOOT)
{
if(vehicleid == cruiser1)
{
if(!gTeam[playerid] == TEAM_COP);
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_RED, "This vehicle belongs to the San Fierro Police Department.");
}
}
}
return 1;
}
Originally Posted by Niixie
pawn Код:
How about that? donno if it would work |
C:\Users\Torran\Documents\Server\gamemodes\script.pwn(485) : error 029: invalid expression, assumed zero
C:\Users\Torran\Documents\Server\gamemodes\script.pwn(485 -- 486) : warning 215: expression has no effect
C:\Users\Torran\Documents\Server\gamemodes\script.pwn(486) : error 001: expected token: ";", but found "else"
C:\Users\Torran\Documents\Server\gamemodes\script.pwn(492) : warning 217: loose indentation
C:\Users\Torran\Documents\Server\gamemodes\script.pwn(495) : error 030: compound statement not closed at the end of file (started at line 479)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
3 Errors.
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(newstate == PLAYER_STATE_DRIVER && oldstate == PLAYER_STATE_ONFOOT)
{
if(vehicleid == cruiser1)
{
if(!gTeam[playerid] == TEAM_COP)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_RED, "This vehicle belongs to the San Fierro Police Department.");
}
}
}
return 1;
}