19.11.2008, 19:20
1.
Max cars is 700, why 1000?
2.
You're destroying the textdraw, and creating a new every second? Try with TextDrawSetString.
3.
NoFuel assigned to playerid? IMO vehicleid would be much better.
4.
no "NoFuel[playerid] = 0;" ?
5.
Indent your code.
This FS looks alright, good job
pawn Код:
#define CAR_AMOUNT 1000
2.
pawn Код:
new Text:vehht;
TextDrawDestroy(Text:vehht);
//some if's...
new vhealth[256];
new Float:vehhealth;
GetVehicleHealth(vehid, vehhealth);
format(vhealth, sizeof(vhealth), "~p~Vehicle info ~n~~r~Health:~w~ %.0f~n~~g~Fuel:~w~ %d%",vehhealth,Gas[vehid]);
vehht = TextDrawCreate(500, 415, vhealth);
3.
pawn Код:
NoFuel[playerid] = 1;
4.
pawn Код:
if(strcmp(cmdtext, "/exitveh", true) == 0)
{
if(NoFuel[playerid] == 1)
{
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
}
}
5.
Indent your code.
This FS looks alright, good job