24.01.2011, 12:17
Quote:
Isn't the second argument supposed to be an integer value not a floating/fixed point value? If i remember correctly its an integer. (not sure havn't used that include in a while)
EDIT: Also you must declare the bar variable with the bar indentifier eg, pawn Код:
|
Quote:
I've never used that include although can you give me a code that links to gas?
and where the variable is created. |
Код:
new Bar:gas[MAX_PLAYERS] = {INVALID_BAR_ID, ...}; public ProgressBar() { for(new playerid; playerid < MAX_PLAYERS; playerid++) { new vehicleid; if((vehicleid = GetPlayerVehicleID(playerid)) && gGas[playerid] != INVALID_BAR_ID) { CheckGas(vehicleid, gGas); SetProgressBarValue(playerid, gas); UpdateProgressBar(gas[playerid], playerid); } } } if(newstate == PLAYER_STATE_DRIVER) { gas[playerid] = CreateProgressBar(50.0, 300.0, _, _, 0xFF0000FF, 100.0); ShowProgressBarForPlayer(playerid, gas[playerid]);