[SOLVED]Trying to save paintjobs?
#1

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);
Reply
#2

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)