Quote:
Originally Posted by yqyq007
warning 216: nested comment
Quote:
public CheckGas()
{
new string[256];
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
{
new vehicle = GetPlayerVehicleID(i);
if(PlayerInfo[i][pNew2G] > 0)
{
if(PlayerInfo[i][pNew2G] <= 10) { PlayerPlaySound(i, 1085, 0.0, 0.0, 0.0); }
if(gG2as[i] == 1) {
format(string, sizeof(string), "~r~~n~~n~~n~~n~~n~~n~~n~~n~~n~Fuel:~w~ %d%",PlayerInfo[i][pNew2G]);
GameTextForPlayer(i,string,15500,3);
}
//if(IsAPlane(vehicle) || IsABoat(vehicle)) { Gas[vehicle]++; }
if((vehicle>=34&&vehicle<=40)||IsABus(vehicle)||Is ACopCar(vehicle)||IsABus(vehicle)||IsAnAmbulance(v ehicle)){PlayerInfo[i][pNew2G]-=1;return 1;}
else
{
PlayerInfo[i][pNew2G]-=2;
return 1;
}
}
}
}
}
return 1;
}
|
|
Pawn doesnt support nested comments.