28.10.2012, 17:44
Here is an example :
I hope that I have helped .
pawn Код:
new Iterator:CarUse<700>;
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/usecar", true))
{
Iter_Add(CarUse, GetPlayerVehicleID(playerid) - 1);
return 1;
}
if(!strcmp(cmdtext, "/stopusingcar", true))
{
Iter_Remove(CarUse, GetPlayerVehicleID(playerid) - 1);
return 1;
}
if(!strcmp(cmdtext, "/carsbeingused", true))
{
foreach(CarUse, x)
{
printf("ID: %d", x + 1);
}
return 1;
}
return 0;
}
I hope that I have helped .