04.09.2010, 16:05
ok guys i has scripted dialog menu of teleports and weapon's and i have problem when ill tupe the commands in the game the dialog showed me but cant teleport me and cant give me weapon take look:
this is for weapons dialog menu
and
and this is for teleports dialog menu
so please help
THANKS.
Код:
// This is a comment // uncomment the line below if you want to write a filterscript //#define FILTERSCRIPT #include <a_samp> #define weaponmenu 1 #if defined FILTERSCRIPT #endif public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp(cmdtext, "/weapons", true)) { ShowPlayerDialog(playerid, weaponmenu, DIALOG_STYLE_LIST, "Weapons Menu", "\nShawn-Off \nTec9 \nM4 \nSniper", "Select", "Cancel"); return 1; } return 0; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == weaponmenu) { if(response) { if(listitem == 0) //Shawn-Off { GivePlayerWeapon(playerid, 26, 5004); SendClientMessage(playerid, 0xCC6600, "You have picked Shawn-Off"); return 1; } if(listitem == 1) //Tec9 { GivePlayerWeapon(playerid, 32, 5100); SendClientMessage(playerid, 0xCC6600, "You have picked Tec9"); return 1; } if(listitem == 2) //M4 { GivePlayerWeapon(playerid, 67, 5050); SendClientMessage(playerid, 0xCC6600, "You have picked M4"); return 1; } if(listitem == 3) //Sniper { GivePlayerWeapon(playerid, 34, 5000); SendClientMessage(playerid, 0xCC6600, "You have picked Sniper Rifle"); } } } return 1; }
and
Код:
// This is a comment // uncomment the line below if you want to write a filterscript //#define FILTERSCRIPT #include <a_samp> #define teleportmenu 1 #define weaponmenu 1 #if defined FILTERSCRIPT #endif public OnPlayerCommandText(playerid, cmdtext[]) { if (!strcmp(cmdtext, "/teleport", true)) { ShowPlayerDialog(playerid, teleportmenu, DIALOG_STYLE_LIST, "Teleport Menu", "\nDM Area" "\nStunt Area" "\nRace Area" "\nDrift Area" "\nAdmin Area", "Select", "Cancel"); return 1; } return 0; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == teleportmenu) { if(response) { if(listitem == 0) //DM AREA { SetPlayerPos(playerid, -975.975708,1060.983032,1345.671875); SetPlayerInterior(playerid, 10); SendClientMessage(playerid, 0xAA3333AA, "Welcome In DM Area"); return 1; } if(listitem == 1) //STUNT AREA { SendClientMessage(playerid, 0xAA3333AA, "NOT SCRIPTED YET"); } if(listitem == 2) //RACE AREA { SendClientMessage(playerid, 0xAA3333AA, "NOT SCRIPTED YET"); } if(listitem == 3) //DRIFT AREA { SendClientMessage(playerid, 0xAA3333AA, "NOT SCRIPTED YET"); } if(listitem == 4) //ADMIN AREA { SetPlayerPos(playerid, -2879.232421875, 455.7958984375, 4.8951416015625); SetPlayerInterior(playerid, 0); SendClientMessage(playerid, 0xAA3333AA, "Welcome, In Admin Area. Enjoy In The Admin Area"); } } } return 1; }
so please help
THANKS.