Hali. Valamért nem jó a neon ppc módba pedig benne így van benne.
PPC_Defines.inc
Definesnél.
#define DialogNeon 109
enum TVehicleData
{
bool:MafiaLoad, // Holds True if the vehicle (or trailer) is carrying a mafia-wanted load
Fuel, // Holds the amount of fuel for this vehicle
BelongsToHouse, // Holds the HouseID to which this vehicle belongs
bool:StaticVehicle, // Holds true if this is a static vehicle
bool:Owned, // Holds true if the vehicle is owned by somebody
Owner[24], // Holds the name of the owned of the vehicle
Model, // Holds the vehicle-model of this vehicle
PaintJob, // Holds the ID of the paintjob applied to the vehicle
Components[14], // Holds all Component-ID\'s for all components on the vehicle
Color1, // Holds the primary color for this vehicle
Color2, // Holds the secundairy color for this vehicle
NeonLeft, // Holds the neon-object on the left side
NeonRight, // Holds the neon-object on the right side
Float:SpawnX, // Holds the X-coordinate of the parking spot for this vehicle
Float:SpawnY, // Holds the Y-coordinate of the parking spot for this vehicle
Float:SpawnZ, // Holds the Z-coordinate of the parking spot for this vehicle
Float:SpawnRot, // Holds the rotation of the parking spot for this vehicle
bool:Clamped // Holds \"true\" if the vehicle is clamped by an admin
}
// Setup an array which holds all data for every vehicleid, max 2000 vehicles (server limit)
new AVehicleData[2000][TVehicleData];
PPC_Dialog.inc
Dialog_Neon(playerid, response, listitem)
{
// Just close the dialog if the player clicked \"Cancel\"
if(!response) return 1;
// Setup local variables
new vehicleid;
// Get the player\'s vehicle
vehicleid = GetPlayerVehicleID(playerid);
// Check if the player chose anothet option than \"Remove neons\"
if (listitem != 7)
{
// Check if the vehicle already has neon lights attached
if (AVehicleData[vehicleid][NeonLeft] != 0)
{
// Delete the current neon-lights and clear the variables
DestroyObject(AVehicleData[vehicleid][NeonLeft]);
DestroyObject(AVehicleData[vehicleid][NeonRight]);
AVehicleData[vehicleid][NeonLeft] = 0;
AVehicleData[vehicleid][NeonRight] = 0;
}
}
// Process the option chosen from the dialog
if (listitem == 0) // Police Light
{
AVehicleData[vehicleid][NeonLeft] = CreateObject(18646,0,0,0,0,0,0);
AVehicleData[vehicleid][NeonRight] = CreateObject(18646,0,0,0,0,0,0);
AttachObjectToVehicle(AVehicleData[vehicleid][NeonLeft], vehicleid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(AVehicleData[vehicleid][NeonRight], vehicleid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid, \"~p~Rendör Neon~w~ Szerelve felszerelve a jármûvedre!\", 3500, 5);
}
if (listitem == 1) // piros light
{
AVehicleData[vehicleid][NeonLeft] = CreateObject(18647,0,0,0,0,0,0);
AVehicleData[vehicleid][NeonRight] = CreateObject(18647,0,0,0,0,0,0);
AttachObjectToVehicle(AVehicleData[vehicleid][NeonLeft], vehicleid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(AVehicleData[vehicleid][NeonRight], vehicleid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid, \"~p~Piros Neon~w~ Szerelve felszerelve a jármûvedre!\", 3500, 5);
}
if (listitem == 2) // kék light
{
AVehicleData[vehicleid][NeonLeft] = CreateObject(18648,0,0,0,0,0,0);
AVehicleData[vehicleid][NeonRight] = CreateObject(18648,0,0,0,0,0,0);
AttachObjectToVehicle(AVehicleData[vehicleid][NeonLeft], vehicleid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(AVehicleData[vehicleid][NeonRight], vehicleid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid, \"~p~Kék Neon~w~ Szerelve felszerelve a jármûvedre!\", 3500, 5);
}
if (listitem == 3) // zöld Light
{
AVehicleData[vehicleid][NeonLeft] = CreateObject(18649,0,0,0,0,0,0);
AVehicleData[vehicleid][NeonRight] = CreateObject(18649,0,0,0,0,0,0);
AttachObjectToVehicle(AVehicleData[vehicleid][NeonLeft], vehicleid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(AVehicleData[vehicleid][NeonRight], vehicleid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid, \"~p~Zöld Neon~w~ Szerelve felszerelve a jármûvedre!\", 3500, 5);
}
if (listitem == 4) // sárga Light
{
AVehicleData[vehicleid][NeonLeft] = CreateObject(18650,0,0,0,0,0,0);
AVehicleData[vehicleid][NeonRight] = CreateObject(18650,0,0,0,0,0,0);
AttachObjectToVehicle(AVehicleData[vehicleid][NeonLeft], vehicleid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(AVehicleData[vehicleid][NeonRight], vehicleid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid, \"~p~Sárga Neon~w~ Szerelve felszerelve a jármûvedre!\", 3500, 5);
}
if (listitem == 5) // rózsaszin Light
{
AVehicleData[vehicleid][NeonLeft] = CreateObject(18651,0,0,0,0,0,0);
AVehicleData[vehicleid][NeonRight] = CreateObject(18651,0,0,0,0,0,0);
AttachObjectToVehicle(AVehicleData[vehicleid][NeonLeft], vehicleid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(AVehicleData[vehicleid][NeonRight], vehicleid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid, \"~p~Rózsaszin neon~w~ Szerelve felszerelve a jármûvedre!\", 3500, 5);
}
if (listitem == 6) // fehér Light
{
AVehicleData[vehicleid][NeonLeft] = CreateObject(18652,0,0,0,0,0,0);
AVehicleData[vehicleid][NeonRight] = CreateObject(18652,0,0,0,0,0,0);
AttachObjectToVehicle(AVehicleData[vehicleid][NeonLeft], vehicleid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(AVehicleData[vehicleid][NeonRight], vehicleid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid, \"~p~Fehér neon~w~ Szerelve felszerelve a jármûvedre!\", 3500, 5);
}
if (listitem == 7) // Remove neons
{
// Delete the current neon-lights and clear the variables
DestroyObject(AVehicleData[vehicleid][NeonLeft]);
DestroyObject(AVehicleData[vehicleid][NeonRight]);
AVehicleData[vehicleid][NeonLeft] = 0;
AVehicleData[vehicleid][NeonRight] = 0;
GameTextForPlayer(playerid, \"Neon-t törölted a jármûröl!\", 3500, 5);
}
return 1;
}
PPC_PlayerCommand.inc
COMMAND:neon(playerid, params[])
{
// Setup local variables
new OptionsList[200], DialogTitle[200];
// Send the command to all admins so they can see it
SendAdminText(playerid, \"/neon\", params);
// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
// Check if the player is the driver of a vehicle
if (GetPlayerVehicleSeat(playerid) == 0)
{
format(DialogTitle, sizeof(DialogTitle), \"Neon Lista:\");
format(OptionsList, sizeof(OptionsList), \"%sRendör Neon\\n\", OptionsList);
format(OptionsList, sizeof(OptionsList), \"%sPiros Neon\\n\", OptionsList);
format(OptionsList, sizeof(OptionsList), \"%sKék Neon\\n\", OptionsList);
format(OptionsList, sizeof(OptionsList), \"%sZöld Neon\\n\", OptionsList);
format(OptionsList, sizeof(OptionsList), \"%sSárga Neon\\n\", OptionsList);
format(OptionsList, sizeof(OptionsList), \"%sRózsaszin Neon\\n\", OptionsList);
format(OptionsList, sizeof(OptionsList), \"%sFehér Neon\\n\", OptionsList);
format(OptionsList, sizeof(OptionsList), \"%sTörli a Neon-t\\n\", OptionsList);
// Show the neon menu
ShowPlayerDialog(playerid, DialogNeon, DIALOG_STYLE_LIST, DialogTitle, OptionsList, \"Rátesz\", \"Nem\");
}
else
SendClientMessage(playerid, 0xFF0000FF, \"Nem vagy jármûben!!\");
}
else
return 0;
// Let the server know that this was a valid command
return 1;
}
És a módba.
respone alatt
case DialogNeon: Dialog_Neon(playerid, response, listitem);