22.08.2012, 08:28
OK,so I wanted a command that would return the numbers of cars I have in my server,yet,the command I made always return 2000(MAX_VEHICLES),so I don't see what's worng,help me pls?
pawn Код:
COMMAND:countcars(playerid,params[])
{
new counter=0;
for(new i=0;i<MAX_VEHICLES;i++)
{
if(i!=INVALID_VEHICLE_ID)
{
counter++;
}
}
new string[128];
format(string,sizeof(string),"%d",counter);
SendClientMessage(playerid,COLOR_RED,string);
return 1;
}