Vehicle Number Plates - Random OnVehicleSpawn
#1

Hey Guys!

I've been working on my script and now i'm wondering if it's possible to give every car a Certain NumberPlate, for example every numberplate will start off with: "NGRP", then the last 3 letters would be random, i've tried it with just Army Cars, but it doesn't seem to set the numberplate, here's my code.

pawn Код:
public OnVehicleSpawn(vehicleid)
{
    new string[56];
    if(vehicleid >= 1 && vehicleid <= 9)
    {
        new randnumb = 1 + random(9);
      format(string, sizeof(string),"NGRP %d%d%d",randnumb,randnumb,randnumb);
      SetVehicleNumberPlate(vehicleid, string);
    }
    return 1;
}
but the vehicle numberplate just wont change, any ideas? Thanks.


(( Nevermind SetVehicleNumberPlate has been removed, thanks though. ))
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)