18.11.2011, 18:59
Hey i have something with my server
i cannot to use commands with those Console :
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
like at this script :
i can only to see the First Dialog i chose a option and the dialog is closed an nothing happends :/
i cannot to use commands with those Console :
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
like at this script :
Quote:
// This is a comment // uncomment the line below if you want to write a filterscript //Wheels and Spoilers By DexToxz //#define FILTERSCRIPT #include <a_samp> #define COLOR_DARKORANGE 0xFF3F00AA #if defined FILTERSCRIPT public OnFilterScriptInit() { print("\n--------------------------------------"); print(" Spoilers and Wheels By DexToxz"); print("--------------------------------------\n"); return 1; } public OnFilterScriptExit() { return 1; } #else main() { print("\n----------------------------------"); print(" Blank Gamemode by your name here"); print("----------------------------------\n"); } #endif public OnGameModeInit() { // Don't use these lines if it's a filterscript SetGameModeText("Drift/Race/Stunt/Drag"); AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); return 1; } public OnGameModeExit() { return 1; } public OnPlayerRequestClass(playerid, classid) { SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746); SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746); SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746); return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/toys", cmdtext, true, 10) == 0) { ShowPlayerDialog(playerid,1223,DIALOG_STYLE_LIST," Car Things By : DexToxz","Spoilers\nWheels","Ok", "Cancel"); return 1; } return 0; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { new vehicleid; vehicleid = GetPlayerVehicleID(playerid); switch(dialogid) { case 1223: { if(!response) { SendClientMessage(playerid, 0xFF0000FF, "You cancelled."); return 1; } switch(listitem) { case 0: { if(GetVehicleModel(vehicleid) == 562||565||559||560||558||561) { ShowPlayerDialog(playerid,1226,DIALOG_STYLE_LIST," Spoilers","Just Click here","Ok", "Cancel"); } else { SendClientMessage(playerid,COLOR_DARKORANGE,"You have to be in a Tuner"); } } case 1: { ShowPlayerDialog(playerid,1225,DIALOG_STYLE_LIST," Wheels","Wheels","Ok", "Cancel"); } } } case 1226: { if(!response) { SendClientMessage(playerid, 0xFF0000FF, "You cancelled."); return 1; } switch(listitem) { case 0: { if(IsTuner(GetVehicleModel(vehicleid))) { ShowPlayerDialog(playerid,1240,DIALOG_STYLE_LIST," Spoilers","Spoiler Pro\nSpoiler Win\nSpoiler Drag\nSpoiler Alpha\nSpoiler Race\nSpoiler Worx","Ok", "Cancel"); return 1; } else { SendClientMessage(playerid,COLOR_DARKORANGE,"You have to be in a Tuner"); } } } } case 1227: { if(!response) { SendClientMessage(playerid, 0xFF0000FF, "You cancelled."); return 1; } switch(listitem) { case 0: { ShowPlayerDialog(playerid,1246,DIALOG_STYLE_LIST," Rims","Ahab\nVirtual\nAccess\nShadow\nMega\nRimshi ne\nWires\nClassic\nTwist\nCutter\nSwitch\nGrove\n Import\nDollar\nTrance\nAtomic","Ok", "Cancel"); } case 1: { ShowPlayerDialog(playerid,1247,DIALOG_STYLE_LIST," Extra","Bas Boost\nHydraulics\nNitro x2\nNitro x5\nNitro x10","Ok", "Cancel"); } } } case 1240: { if(!response) { SendClientMessage(playerid, 0xFF0000FF, "You cancelled."); return 1; } switch(listitem) { case 0: { if(GetVehicleModel(vehicleid) >=1) { AddVehicleComponent(vehicleid, 1000); GivePlayerMoney(playerid,-800); SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added"); } else { SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle"); } } case 1: { if(GetVehicleModel(vehicleid) >=1) { AddVehicleComponent(vehicleid, 1001); GivePlayerMoney(playerid,-800); SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added"); } else { SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle"); } } case 2: { new vehicle; vehicle = GetPlayerVehicleID(playerid); if(GetVehicleModel(vehicleid) >=1) { AddVehicleComponent(vehicle, 1002); GivePlayerMoney(playerid,-800); SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added"); } else { SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle"); } } case 3: { new vehicle; vehicle = GetPlayerVehicleID(playerid); if(GetVehicleModel(vehicleid) >=1) { AddVehicleComponent(vehicle, 1003); GivePlayerMoney(playerid,-800); SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added"); } else { SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle"); } } case 4: { new vehicle; vehicle = GetPlayerVehicleID(playerid); if(GetVehicleModel(vehicleid) >=1) { AddVehicleComponent(vehicle, 1015); GivePlayerMoney(playerid,-800); SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added"); } else { SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle"); } } case 5: { new vehicle; vehicle = GetPlayerVehicleID(playerid); if(GetVehicleModel(vehicleid) >=1) { AddVehicleComponent(vehicle, 1016); GivePlayerMoney(playerid,-800); SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added"); } else { SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle"); } } } } case 1246: { if(!response) { SendClientMessage(playerid, 0xFF0000FF, "You cancelled."); return 1; } switch(listitem) { case 0: { if(GetVehicleModel(vehicleid) >=1) { AddVehicleComponent(vehicleid, 1096); GivePlayerMoney(playerid,-800); SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added"); } else { SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle"); } } case 1: { if(GetVehicleModel(vehicleid) >=1) { AddVehicleComponent(vehicleid, 1097); GivePlayerMoney(playerid,-800); SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added"); } else { SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle"); } } case 2: { if(GetVehicleModel(vehicleid) >=1) { AddVehicleComponent(vehicleid, 109; GivePlayerMoney(playerid,-800); SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added"); } else { SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle"); } } case 3: { if(GetVehicleModel(vehicleid) >=1) { AddVehicleComponent(vehicleid, 1073); GivePlayerMoney(playerid,-800); SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added"); } else { SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle"); } } case 4: { if(GetVehicleModel(vehicleid) >=1) { AddVehicleComponent(vehicleid, 1074); GivePlayerMoney(playerid,-800); SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added"); } else { SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle"); } } case 5: { if(GetVehicleModel(vehicleid) >=1) { AddVehicleComponent(vehicleid, 1075); GivePlayerMoney(playerid,-800); SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added"); } else { SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle"); } } case 6: { if(GetVehicleModel(vehicleid) >=1) { AddVehicleComponent(vehicleid, 1076); GivePlayerMoney(playerid,-800); SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added"); } else { SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle"); } } case 7: { if(GetVehicleModel(vehicleid) >=1) { AddVehicleComponent(vehicleid, 1077); GivePlayerMoney(playerid,-800); SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added"); } else { SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle"); } } case 8: { if(GetVehicleModel(vehicleid) >=1) { AddVehicleComponent(vehicleid, 107; GivePlayerMoney(playerid,-800); SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added"); } else { SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle"); } } case 9: { if(GetVehicleModel(vehicleid) >=1) { AddVehicleComponent(vehicleid, 1079); GivePlayerMoney(playerid,-800); SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added"); } else { SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle"); } } case 10: { if(GetVehicleModel(vehicleid) >=1) { AddVehicleComponent(vehicleid, 1080); GivePlayerMoney(playerid,-800); SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added"); } else { SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle"); } } case 11: { if(GetVehicleModel(vehicleid) >=1) { AddVehicleComponent(vehicleid, 1081); GivePlayerMoney(playerid,-800); SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added"); } else { SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle"); } } case 12: { if(GetVehicleModel(vehicleid) >=1) { AddVehicleComponent(vehicleid, 1082); GivePlayerMoney(playerid,-800); SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added"); } else { SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle"); } } case 13: { if(GetVehicleModel(vehicleid) >=1) { AddVehicleComponent(vehicleid, 1083); GivePlayerMoney(playerid,-800); SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added"); } else { SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle"); } } case 14: { if(GetVehicleModel(vehicleid) >=1) { AddVehicleComponent(vehicleid, 1084); GivePlayerMoney(playerid,-800); SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added"); } else { SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle"); } } case 15: { if(GetVehicleModel(vehicleid) >=1) { AddVehicleComponent(vehicleid, 1085); GivePlayerMoney(playerid,-800); SendClientMessage(playerid,COLOR_DARKORANGE,"Vehic le Component added"); } else { SendClientMessage(playerid,COLOR_DARKORANGE,"This is not an Vehicle"); } } } } } return 0; } stock IsTuner(modelid) { switch(modelid) { case 562, 565, 559, 560, 558, 561: return true; } return false; } |