22.11.2012, 18:03
How to make this code:
Fit here:
Код:
{
new string[50];
format(string,sizeof(string),"{000000}%c%c%c %i%i%i",(65+random(26)),(65+random(26)),(65+random(26)),random(10),random(10),random(10));
SetVehicleNumberPlate(vehicleid,string);
}
Код:
public OnVehicleSpawn(vehicleid) { if(gDestroyVehicle[vehicleid]) // if vehicle id is marked for deletion { ////foreach(Player, i) // for all players for(new i; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(i) && IsPlayerInVehicle(i,vehicleid)) // if connected and in vehicleid { RemovePlayerFromVehicle(i); // remove from vehicle } } SetVehicleVirtualWorld(vehicleid,255); // set vehicle to unused vw to prevent players from using it SetTimerEx("KillCar",10000,0,"d",vehicleid); for(new i = 0; i < sizeof(CreatedCars); i++) { if(CreatedCars[i] == vehicleid) { CreatedCars[i] = INVALID_VEHICLE_ID; break; } } } return 1; }