SA-MP Forums Archive
Custom Plates - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Custom Plates (/showthread.php?tid=258623)



Custom Plates - berz - 31.05.2011

Hey all. How i can make that all cars on my server have same plates? Something like on Romanian Super Stunt - they have RSS. Help me pL0x :P


Re: Custom Plates - ColdIce - 31.05.2011

pawn Код:
public OnVehicleSpawn(vehicleid)
{
   new rand = random(3000); rand += 1500;
   new string[32];
   format(string, sizeof(string), "{D20000}YOURPLATE", rand);
   SetVehicleNumberPlate(vehicleid, string);
}



Re: Custom Plates - berz - 31.05.2011

So every car will have plate i put? Cuz im using Reallife gm so i want everyone who own car that have plate i put, not the vehicle i spawn. And idk rly script well. ( so that code is for every car, not just spawned one? )


Re: Custom Plates - Sasino97 - 31.05.2011

pawn Код:
public OnGameModeInit()
{
  SetVehiclePlates();
  return 1;
}

public OnVehicleSpawn(vehicleid)
{
  SetVehiclePlates();
  return 1;
}

stock SetVehiclePlates()
{
  for(new i=0;i<MAX_VEHICLES;i++)
  {
    SetVehicleNumberPlate(i, "Your plate"); //All vehicles will have this plate
  }
  return 1;
}