SA-MP Forums Archive
[SOLVED]Trying to save paintjobs? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [SOLVED]Trying to save paintjobs? (/showthread.php?tid=122715)



[SOLVED]Trying to save paintjobs? - Djiango - 23.01.2010

Hi I made an include for saving my paintjobs.
It looks like this.
Pastebin

It's working perfectly fine, except in filterscripts.
So decided to make another include for filterscripts.
pawn Код:
#include <a_samp>

forward SetFSPaint(vehicleid, paint);
public SetFSPaint(vehicleid, paint)
{
    return CallRemoteFunction("SetPaintjob","ii",vehicleid, paint);
}
However this doesn't work at all. So could anyone please guide me in the right direction?

EDIT: SetPaintjob and GetPaintjob, works as it should in my GM.
Example:
pawn Код:
if(PlayerCars[playerid][VehPaint] > -1) SetPaintjob(PlayerCars[playerid][VehID1], PlayerCars[playerid][VehPaint]);
pawn Код:
dcmd_getpaint(playerid, params[])
{
    #pragma unused params
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_BRIGHTRED, "ERROR: You need to be in a vehicle!");
    new vehicleid = GetPlayerVehicleID(playerid);
    new Paint1 = GetPaintjob(vehicleid);
    new string[15];
    format(string, sizeof(string), "Paint ID = %i", Paint1);
    SendClientMessage(playerid, COLOR_GOLD, string);
    return 1;
}
However it doesn't work in my filterscripts.
Example:
pawn Код:
SetFSPaint(car,1);



Re: Trying to save paintjobs? - Djiango - 24.01.2010

Bump.
I know it can be done, but not sure if i'm doing it right.

Solution:
I've added the content of of the first include to my game mode.
And used CallRemoteFunction("SetPaintjob","ii",vehicleid,pa intjob); instead of an include in my filterscripts.