23.01.2010, 10:26
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.
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:
However it doesn't work in my filterscripts.
Example:
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);
}
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;
}
Example:
pawn Код:
SetFSPaint(car,1);