Vehicle License plate
#9

Quote:
Originally Posted by ThePandaDK
Посмотреть сообщение
Can some one explain me why it doesnt works? i'v even placed it on "OnVehicleSpawn"
still it doesn't shows me
After you change a vehicle's plate, you need to respawn it again for the changes to be noticed.

Read this: https://sampwiki.blast.hk/wiki/SetVehicleNumberPlate

Should be something like:

pawn Код:
public OnVehicleSpawn( vehicleid )
{
         ChangeVehPlate( vehicleid );
         SetVehicleToRespawn(vehicleid);
         return 1;
}

stock ChangeVehPlate( vehicleid )
{
    new string[8], string2[4];
   
    format(string2,sizeof(string2),"%03i", vehicleid );  
    format(string,sizeof(string),"LV-%s", string2 );
   
    SetVehicleNumberPlate( vehicleid, string );
   
    return 1;
}
or just add the SetVehicleToRespawn inside the function "ChangeVehPlate", before the return and on OnVehicleSpawn put the function, like this:

pawn Код:
public OnVehicleSpawn( vehicleid )
{
         ChangeVehPlate( vehicleid );
         
         return 1;
}

stock ChangeVehPlate( vehicleid )
{
    new string[8], string2[4];
   
    format(string2,sizeof(string2),"%03i", vehicleid );  
    format(string,sizeof(string),"LV-%s", string2 );
   
    SetVehicleNumberPlate( vehicleid, string );

    SetVehicleToRespawn(vehicleid);
   
    return 1;
}
Reply


Messages In This Thread
Vehicle License plate - by DannySnoopy - 12.03.2012, 10:47
Re: Vehicle License plate - by DannySnoopy - 12.03.2012, 11:14
Re: Vehicle License plate - by clavador - 12.03.2012, 11:22
Re: Vehicle License plate - by Vince - 12.03.2012, 11:37
Re: Vehicle License plate - by DannySnoopy - 12.03.2012, 12:49
Re: Vehicle License plate - by Jonny5 - 12.03.2012, 14:02
Re: Vehicle License plate - by DannySnoopy - 12.03.2012, 14:17
Re: Vehicle License plate - by DannySnoopy - 12.03.2012, 14:58
Re: Vehicle License plate - by clavador - 12.03.2012, 18:05
Re: Vehicle License plate - by Jonny5 - 12.03.2012, 19:24

Forum Jump:


Users browsing this thread: 1 Guest(s)