30.01.2013, 19:45
pawn Код:
if(!strcmp(cmd, "/fuelcars", true))
{
new TD_String[25];
if(PlayerInfo[playerid][pAdmin] < 4) return SendClientMessage(playerid, COLOR_GREY, " You are not an Admin ! ");
for(new i = 1; i < MAX_VEHICLES; i++) //why?
{
new SecondFuel[MAX_VEHICLES], FirstFuel[MAX_VEHICLES];
SecondFuel[i] = VehicleFuel[i] % 10;
FirstFuel[i] = (VehicleFuel[i] - SecondFuel[i]) / 10;
VehicleFuel[i] = 1000;//what if you delete the textdrw here
format(TD_String, 25, "%i.%i", FirstFuel,SecondFuel);// so lets say i have 99.8 i do /fuelcars and its still 99.8
for(new p = 0; p < MAX_PLAYERS; p++)
{
if(IsPlayerConnected(p))
{
TextDrawSetString(Text:Values[playerid][3], TD_String); // was it i or playerid??before??
}
}
}
SendClientMessageToAll(COLOR_RED, "• Toate Masinile au fost umplute de combustibil! •"); // compile?yeah;0 now the command is smaller,i always use this methode
return 1;
}