15.01.2011, 19:25
how can i plate my vehs for example the firs EX-01, the second: EX-02 etc.
/without getting the vehicle ids/
/without getting the vehicle ids/
public OnVehicleSpawn(vehicleid)
{
new license[8];
format(license, sizeof(license), "EX-0%i", vehicleid);
SetVehicleNumberPlate(vehicleid, license);
SetVehicleToRespawn(vehicleid);
return 1;
}
public OnVehicleSpawn(vehicleid)
{
new
lString[8] // max string for plates is 32.
;
for(new i=0; i<MAX_VEHICLES; i++)
{
format(lString, sizeof(lString), "EX-%i", i);
SetVehicleNumberPlate(vehicleid, lString);
SetVehicleToRespawn(vehicleid);
}
return 1;
}
|
This should work:
pawn Код:
|
|
You don't even need a loop, not even once. If one vehicle spawns, then it loops through all vehicles in the server just to get the vehicleid? Have you noticed the parameter?
|
if(Flaming[posterid] == true)
{
Flaming[posterid] = false;
Infract(posterid, "No flaming", 10);
return 1;
}