#include <a_samp> // This is a comment // uncomment the line below if you want to write a filterscript //#define FILTERSCRIPT #define COLOR_PURPLE #if defined FILTERSCRIPT public OnFilterScriptInit() { } print("\n--------------------------------------"); print(" Tune Youre Car Filterscript by 3lm0" ); print("--------------------------------------\n"); return 1; } public OnFilterScriptExit() { return 1; } #else public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp(cmdtext, "/elegy", true)==0) { AddVehicleComponent(562, 1010); AddVehicleComponent(562, 1034); AddVehicleComponent(562, 1036); AddVehicleComponent(562, 1146); AddVehicleComponent(562, 1149); AddVehicleComponent(562, 1171); ChangeVehiclePaintjob(562, 3); ChangeVehicleColor(562, 6, 6); return 1; } if (strcmp("/sultan", cmdtext, true, 10) == 0) { ChangeVehiclePaintjob(560, 3); ChangeVehicleColor(560, 6, 6); SetVehicleNumberPlate(560, "Future"); AddVehicleComponent(560, 1139); AddVehicleComponent(560, 1169); AddVehicleComponent(560, 1010); AddVehicleComponent(560, 1141); IsPlayerInVehicle(playerid, 560); return 1; } return 0; } #endif
new mycar;
mycar = GetPlayerVehicleID(playerid);
ChangeVehiclePaintjob(mycar,3);
AddVehicleComponent(mycar, 1010);
//etc...
Originally Posted by dice7
The server needs to know on what car to apply the paintjob/components.
Do something like this in the begining of your cmd pawn Код:
|
#include <a_samp>
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#define COLOR_PURPLE
#define mycar
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
new mycar; //i have changed this and //////////////////////////////////
mycar = GetPlayerVehicleID(playerid); // this/////////////////////////////
} print("\n--------------------------------------");
print(" Tune Youre Car Filterscript by 3lm0" );
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext, "/elegy", true)==0)
{
AddVehicleComponent(562, 1010);
AddVehicleComponent(562, 1034);
AddVehicleComponent(562, 1036);
AddVehicleComponent(562, 1146);
AddVehicleComponent(562, 1149);
AddVehicleComponent(562, 1171);
ChangeVehiclePaintjob(562, 3);
ChangeVehicleColor(562, 6, 6);
return 1;
}
if (strcmp("/sultan", cmdtext, true, 10) == 0)
{
ChangeVehiclePaintjob(560, 3);
ChangeVehicleColor(560, 6, 6);
SetVehicleNumberPlate(560, "Future");
AddVehicleComponent(560, 1139);
AddVehicleComponent(560, 1169);
AddVehicleComponent(560, 1010);
AddVehicleComponent(560, 1141);
IsPlayerInVehicle(playerid, 560);
return 1;
}
return 0;
}
#endif
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext, "/elegy", true)==0)
{
new mycar;
mycar = GetPlayerVehicleID(playerid);
AddVehicleComponent(mycar, 1010);
AddVehicleComponent(mycar, 1034);
AddVehicleComponent(mycar, 1036);
AddVehicleComponent(mycar, 1146);
AddVehicleComponent(mycar, 1149);
AddVehicleComponent(mycar, 1171);
ChangeVehiclePaintjob(mycar, 3);
ChangeVehicleColor(mycar, 6, 6);
return 1;
}
}
#define COLOR_PURPLE 0x800080AA
Originally Posted by dice7
like so:
pawn Код:
|
Originally Posted by dice7
show the whole code and mark the lines
|
#include <a_samp>
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#define COLOR_PURPLE
#define mycar
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
new mycar;
mycar = GetPlayerVehicleID(playerid);
} print("\n--------------------------------------");
print(" Tune Youre Car Filterscript by 3lm0" );
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext, "/elegy", true)==0)
{
new mycar;
mycar = GetPlayerVehicleID(playerid);
AddVehicleComponent(mycar, 1010);
AddVehicleComponent(mycar, 1034);
AddVehicleComponent(mycar, 1036);
AddVehicleComponent(mycar, 1146);
AddVehicleComponent(mycar, 1149);
AddVehicleComponent(mycar, 1171);
ChangeVehiclePaintjob(mycar, 3);
ChangeVehicleColor(mycar, 6, 6);
return 1;
}
}
if (strcmp("/sultan", cmdtext, true, 10) == 0)
{
ChangeVehiclePaintjob(560, 3);
ChangeVehicleColor(560, 6, 6);
SetVehicleNumberPlate(560, "Future");
AddVehicleComponent(560, 1139);
AddVehicleComponent(560, 1169);
AddVehicleComponent(560, 1010);
AddVehicleComponent(560, 1141);
IsPlayerInVehicle(playerid, 560);
return 1;
}
return 0;
}
#endif
new mycar;
mycar = GetPlayerVehicleID(playerid);
AddVehicleComponent(mycar, 1010);