09.12.2010, 01:23
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp("/exit", cmdtext, true, 10) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInAnyVehicle(playerid))
{
RemovePlayerFromVehicle(playerid);
SCM(playerid,0xFFFF00AA,"* You left the vehicle.");
TogglePlayerControllable(playerid,1);
}else{
SCM(playerid,0xFFFF00AA,"* You are not in a vehicle!");
}
}
return 1;
}
if(strcmp("/afill", cmdtext, true, 11) == 0)
IsPlayerAdmin(playerid);
{
if(IsPlayerInAnyVehicle(playerid))
{
new VID = GetPlayerVehicleID(playerid);
if(Vgas[VID] < 100)
{
ShowMenuForPlayer(Gas,playerid);
}else{
SCM(playerid,0xFFFF00AA,"* Your vehicle is full!");
}
}else{
SCM(playerid,0xFFFF00AA,"* You are not in a vehicle!");
}
return 1;
}
if(strcmp("/fill", cmdtext, true, 10) == 0) // <-------------- this is the line
{
if(IsAtGasStation(playerid))
{
if(IsPlayerInAnyVehicle(playerid))
{
new VID = GetPlayerVehicleID(playerid);
if(Vgas[VID] < 100)
{
ShowMenuForPlayer(Gas,playerid);
}else{
SCM(playerid,0xFFFF00AA,"* Your vehicle is full!");
}
}else{
SCM(playerid,0xFFFF00AA,"* You are not in a vehicle!");
}
}else{
SCM(playerid,0xFFFF00AA,"* You are not at a gas station!");
}
return 1;
}
return 0;
}
pawn Код:
C:\Users\Marino Varesio\Desktop\zombie outbreak\filterscripts\fuelsystem.pwn(90) : warning 225: unreachable code
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Warning.