SA-MP Forums Archive
Custom 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: Custom plate? (/showthread.php?tid=453481)



Custom plate? - wumpyc - 25.07.2013

Код:
public OnVehicleSpawn(vehicleid)
{
    SetVehicleNumberPlate(vehicleid,"0x00FF00FFBrutal Haulers");
    return 1;
}
doesn't work with staticvehicles, also doesn't work when i use:
Код:
CMD:veh(playerid, params[]) {

	new vehid,vehicle;
	if(PlayerInfo[playerid][pLevel] < 1) return error
	if(sscanf(params, "i", vehid)) SendClientMessage(playerid, COLOR_GREY, "USAGE: /veh <carid>");
	else if (vehid < 400 || vehid > 611) SendClientMessage(playerid, COLOR_GREY, "[ERROR] Invalid car id! [ Car ID's range from 400 - 611 ]");
	else
	{
		new Float:x, Float:y, Float:z;
		GetPlayerPos(playerid, x, y, z);
		vehicle = CreateVehicle(vehid, x + 3, y, z, 0, 0,0, -1);
		PutPlayerInVehicle(playerid,vehicle,0);
		SendClientMessage(playerid, COLOR_GREEN, "Car spawned!");
	}
	return 1;
}



Re: Custom plate? - RALL0 - 25.07.2013

I'm not sure if it's going to work but you can give it a go.
Add this under OnGameModeInit
pawn Код:
for(new i=0; i < MAX_VEHICLES; i++)
    {
        SetVehicleNumberPlate(i,"0x00FF00FFBrutal Haulers");
    }



Re: Custom plate? - wumpyc - 25.07.2013

Works. Ty