24.11.2011, 12:31
(
Последний раз редактировалось forgottenkings; 09.06.2013 в 03:08.
)
Tuning Menu
Description:This is a Just A Temporary Vehicle Modification Menu By ForgottenKings It Is Dialog Based!pawn Код:
#include a_samp
#define COLOR_RED 0xFF0000AA
#define TUNEMENU 98544482574
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext, "/tunemenu", true)==0)
{
ShowPlayerDialog(playerid, TUNEMENU, DIALOG_STYLE_LIST, "Tune Menu","Nitrox\nHydraulics\nWheels\nPaint Jobs\nColours", "Select", "Back");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == TUNEMENU)
{
if(response)
{
if(listitem == 0){ AddVehicleComponent(GetPlayerVehicleID(playerid),1010); StartTuneSound(playerid); SendClientMessage(playerid,COLOR_RED,"Hydraulics Added to your Vehicle");}
if(listitem == 1){ AddVehicleComponent(GetPlayerVehicleID(playerid),1087); StartTuneSound(playerid); SendClientMessage(playerid,COLOR_RED,"Nitrox Added to your Vehicle");}
if(listitem == 2) return ShowPlayerDialog(playerid, TUNEMENU+1, DIALOG_STYLE_LIST,"Wheels","Wire\nTwist\nAccess\nMega\nImport\nAtomic\nOfTwistfroad\nClassic", "Select", "Back");
if(listitem == 3) return ShowPlayerDialog(playerid, TUNEMENU+2, DIALOG_STYLE_LIST,"Paint Jobs","Style 1\nStyle 2\nStyle 3\nStyle 4\nStyle 5", "Select", "Back");
if(listitem == 4) return ShowPlayerDialog(playerid, TUNEMENU+3, DIALOG_STYLE_LIST,"Vehicle Colours","Black \nWhite \nDark Blue \nLight Blue\nBlue \nGreen \nRed \nYellow \nPink", "Select", "Back");
}
return 1;
}
if(dialogid == TUNEMENU+1)
{
if(response)
{
if(listitem == 0){ AddVehicleComponent(GetPlayerVehicleID(playerid),1081); StartTuneSound(playerid); SendClientMessage(playerid,COLOR_RED,"Wire Wheels to your Vehicle");}
if(listitem == 1){ AddVehicleComponent(GetPlayerVehicleID(playerid),1078); StartTuneSound(playerid); SendClientMessage(playerid,COLOR_RED,"Twist Wheels Added to your Vehicle");}
if(listitem == 2){ AddVehicleComponent(GetPlayerVehicleID(playerid),1098); StartTuneSound(playerid); SendClientMessage(playerid,COLOR_RED,"Access Wheels Added to your Vehicle");}
if(listitem == 3){ AddVehicleComponent(GetPlayerVehicleID(playerid),1074); StartTuneSound(playerid); SendClientMessage(playerid,COLOR_RED,"Mega Wheels Added to your Vehicle");}
if(listitem == 4){ AddVehicleComponent(GetPlayerVehicleID(playerid),1082); StartTuneSound(playerid); SendClientMessage(playerid,COLOR_RED,"Import Wheels Added to your Vehicle");}
if(listitem == 5){ AddVehicleComponent(GetPlayerVehicleID(playerid),1085); StartTuneSound(playerid); SendClientMessage(playerid,COLOR_RED,"Atomic Wheels Added to your Vehicle");}
if(listitem == 6){ AddVehicleComponent(GetPlayerVehicleID(playerid),1025); StartTuneSound(playerid); SendClientMessage(playerid,COLOR_RED,"OfTwistfroad Wheels Added to your Vehicle");}
if(listitem == 7){ AddVehicleComponent(GetPlayerVehicleID(playerid),1077); StartTuneSound(playerid); SendClientMessage(playerid,COLOR_RED,"Classic Wheels Added to your Vehicle");}
}
return 1;
}
if(dialogid == TUNEMENU+2)
{
if(response)
{
if(listitem == 0){ ChangeVehiclePaintjob(GetPlayerVehicleID(playerid),0); StartTuneSound(playerid); SendClientMessage(playerid,COLOR_RED,"Vehicle Paint Job changed to Paint Job Style 1"); }
if(listitem == 1){ ChangeVehiclePaintjob(GetPlayerVehicleID(playerid),1); StartTuneSound(playerid); SendClientMessage(playerid,COLOR_RED,"Vehicle Paint Job changed to Paint Job Style 2"); }
if(listitem == 2){ ChangeVehiclePaintjob(GetPlayerVehicleID(playerid),2); StartTuneSound(playerid); SendClientMessage(playerid,COLOR_RED,"Vehicle Paint Job changed to Paint Job Style 3"); }
if(listitem == 3){ ChangeVehiclePaintjob(GetPlayerVehicleID(playerid),3); StartTuneSound(playerid); SendClientMessage(playerid,COLOR_RED,"Vehicle Paint Job changed to Paint Job Style 4"); }
if(listitem == 4){ ChangeVehiclePaintjob(GetPlayerVehicleID(playerid),4); StartTuneSound(playerid); SendClientMessage(playerid,COLOR_RED,"Vehicle Paint Job changed to Paint Job Style 5"); }
}
return 1;
}
if(dialogid == TUNEMENU+3)
{
if(response)
{
if(listitem == 0){ ChangeVehicleColor(GetPlayerVehicleID(playerid),0,0); StartTuneSound(playerid); SendClientMessage(playerid,COLOR_RED,"Vehicle Paint changed to Black"); }
if(listitem == 1){ ChangeVehicleColor(GetPlayerVehicleID(playerid),1,1); StartTuneSound(playerid); SendClientMessage(playerid,COLOR_RED,"Vehicle Paint changed to White"); }
if(listitem == 2){ ChangeVehicleColor(GetPlayerVehicleID(playerid),425,425); StartTuneSound(playerid); SendClientMessage(playerid,COLOR_RED,"Vehicle Paint changed to Dark blue"); }
if(listitem == 3){ ChangeVehicleColor(GetPlayerVehicleID(playerid),2,2); StartTuneSound(playerid); SendClientMessage(playerid,COLOR_RED,"Vehicle Paint changed to Light blue"); }
if(listitem == 4){ ChangeVehicleColor(GetPlayerVehicleID(playerid),16,16); StartTuneSound(playerid); SendClientMessage(playerid,COLOR_RED,"Vehicle Paint changed to Green"); }
if(listitem == 5){ ChangeVehicleColor(GetPlayerVehicleID(playerid),3,3); StartTuneSound(playerid); SendClientMessage(playerid,COLOR_RED,"Vehicle Paint changed to Red"); }
if(listitem == 6){ ChangeVehicleColor(GetPlayerVehicleID(playerid),6,6); StartTuneSound(playerid); SendClientMessage(playerid,COLOR_RED,"Vehicle Paint changed to Yellow"); }
if(listitem == 7){ ChangeVehicleColor(GetPlayerVehicleID(playerid),146,146); StartTuneSound(playerid); SendClientMessage(playerid,COLOR_RED,"Vehicle Paint changed to Pink"); }
}
return 1;
}
return 0;
}
stock StartTuneSound(playerid)
{
PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
return 1;
}