SA-MP Forums Archive
Vehicle Number Plate - 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)
+--- Thread: Vehicle Number Plate (/showthread.php?tid=306048)



Vehicle Number Plate - TGameR - 24.12.2011

Hello,
how to create Vehicle Number Plate for name : ''Monster-Game'' please


Re: Vehicle Number Plate - Ironboy - 24.12.2011

Here it is http://forum.sa-mp.com/showthread.ph...t=number+plate
Next time search on Filterscript section.


Re : Vehicle Number Plate - TGameR - 24.12.2011

plate automatic no cmds


Re: Vehicle Number Plate - Dark_Kostas - 24.12.2011

Using this function
https://sampwiki.blast.hk/wiki/SetVehicleNumberPlate

As the vehicle has to be respawned you can use something like
pawn Код:
new bool:IsVehiclePlateOk[MAX_VEHICLES];

OnVehicleSpawn(vehicleid)
{
    if(!IsVehiclePlateOk[vehicleid])
    {
        IsVehiclePlateOk[vehicleid] = true;
        SetVehicleNumberPlate(vehicleid, "Monster-Game");
        SetVehicleToRespawn(vehicleid);
    }
    return 1;
}



Re : Vehicle Number Plate - TGameR - 24.12.2011

Код:
C:\Documents and Settings\Administrateur\Bureau\Monster-Game version Xmas\gamemodes\TE.pwn(17262) : error 021: symbol already defined: "OnVehicleSpawn"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
make a fs please


Re: Vehicle Number Plate - Dark_Kostas - 24.12.2011

symbol already defined

That means that you already use OnVehicleSpawn. Just find it and add that code there instead of having the same callback 2 times.


Re : Vehicle Number Plate - TGameR - 24.12.2011

how to add in please
Код:
}

public OnVehicleSpawn(vehicleid)
{
    S_DATA[ S_VSpawns ]++;
	for( new i=0;i<MAX_PLAYERS;i++ )
	{
        if( vehicleid == P_DATA[ i ][ P_Car ] )
		{
		    CarDeleter(vehicleid);
	        P_DATA[ i ][ P_Car ] = -1;
        }
	}
	return 1;
}



Re: Vehicle Number Plate - iTorran - 24.12.2011

The word "Monster-Game" will not fully fit on a vehicle's number plate, btw.