setvehicleplatenumber pwn code
#1

I need the pawn code for:
setvehicleplatenumber
Reply
#2

https://sampwiki.blast.hk/wiki/SetVehicleNumberPlate
Reply
#3

pawn Код:
CMD:setplate(playerid,params[])
{
    new string[128],plate[128];
    if(sscanf(params, "s", plate)) SendClientMessage(playerid, 0xF97804FF, "USAGE: /setplate [plate]");
    if(!IsPlayerInAnyVehicle(playerid)) SendClientMessage(playerid,COLOR_RED,"You need to be in a vehicle in order to use this..");
    SetVehicleNumberPlate(vehicleid, plate);
    format(string,sizeof(string),"Numberplate setted to: %s",plate);
    SendClientMessage(playerid,COLOR_GREEN,string);
    return 1;
}
Not tested but should work..
next time, use the wiki and search function
Reply
#4

And if you'd like all the cars will have the same plate, use this PWN code:

Код:
for(new i = 1; i <= MAX_VEHICLES; i++)
    {
    SetVehicleToRespawn(i);
    SetVehicleNumberPlate(i, "CHANGE ME"); // Change "CHANGE ME" to your favorable plate.
    }
Make sure it's AFTER all the created vehicles under the following public:

Код:
public OnGameModeInit()
P.S.
If you want to add more vehicles, make sure it's ABOVE the SetVehicleNumberPlate code. Enjoy.
Reply
#5

Is there any other way to do it without <zcmd> include?Im sorry for this question im new
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)