SA-MP Forums Archive
Slight Problem - 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: Slight Problem (/showthread.php?tid=380778)



Slight Problem - [p3]pr0t0typ3 - 26.09.2012

Im having a small problem with my plate change commend:

Код:
COMMAND:mplate(playerid, params[])
    {
	new pr0veh;
	pr0veh = GetPlayerVehicleID(playerid);
        if(isnull(params)) return SendClientMessage(playerid, 0xFFFFFFFF, "/mplate [text]");
        new string[128];
        format(string, sizeof(string), "%s",params);
        SetVehicleNumberPlate(pr0veh,string);
        SendClientMessage(playerid, 0xFFFFFFFF, "Plate Customized!");
        return 1;
     }
It works but the person who types it has to respawn to see it (and sometimes still sees default) I tried respawning the car but then it goes back to where it was spawned and the paintjob/mods are lost.Anybody have a solution please?


Re: Slight Problem - Vince - 26.09.2012

As stated on the wiki, vehicles need to be respawned in order for the changes to be applied. There is no clean solution. Only way to do it is to get all the mods, respawn the car and then re-apply all the mods.


Re: Slight Problem - [p3]pr0t0typ3 - 27.09.2012

Oh ok,well thanks anyway