02.06.2014, 17:27
What gives me this error? I do not understand...
Код:
error 017: undefined symbol "playerid"
pawn Код:
public timer_fuel_lower()
{
new vehicle = GetPlayerVehicleID(playerid);
if(Engine[vehicle] == 1)
{
for(new i=0;i<MAX_PLAYERS;i++) { //loop for all players
if (isrefuelling[i]) continue; //stop when a player is already refuelling
new vid = GetPlayerVehicleID(i); //getting vehicle ID
if (GetPlayerVehicleSeat(i) == 0) { //if the player is a driver (it should only lower the fuel when theres an driver!)
fuelcar[vid] = fuelcar[vid] -1; //lowering fuel value
if (fuelcar[vid]<1) //if fuel is empty
{
fuelcar[vid] = 0; //setting fuel to 0 (else the timer will set it to -1 -2 -3 etc before removing player)
RemovePlayerFromVehicle(i); //remove player out of vehicle
GameTextForPlayer(i,"~r~Ai ramas fara~w~benzina~r~!",5000,4); //show text
}
}
new string[125];format(string,sizeof string,"Benzina:%i",fuelcar[vid]); //preparing string with next fuel value
TextDrawSetString(td_fuel[i],string); //updating textdraw
}
}
return 1;
}