teleport and weapons menu help !!!
#2

pawn Код:
// 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", "Shawn-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;
}
dont use \n at the first list
Reply


Messages In This Thread
teleport and weapons menu help !!! - by [Lsrcr]Rafa - 04.09.2010, 16:05
Re: teleport and weapons menu help !!! - by willsuckformoney - 04.09.2010, 16:16
Re: teleport and weapons menu help !!! - by [Lsrcr]Rafa - 04.09.2010, 16:31
Re: teleport and weapons menu help !!! - by [Lsrcr]Rafa - 04.09.2010, 16:36
Re: teleport and weapons menu help !!! - by willsuckformoney - 04.09.2010, 16:42
Re: teleport and weapons menu help !!! - by [Lsrcr]Rafa - 04.09.2010, 16:44
Re: teleport and weapons menu help !!! - by willsuckformoney - 04.09.2010, 16:48
Re: teleport and weapons menu help !!! - by [Lsrcr]Rafa - 04.09.2010, 16:49
Re: teleport and weapons menu help !!! - by Vandooz - 04.09.2010, 16:50
Re: teleport and weapons menu help !!! - by [Lsrcr]Rafa - 04.09.2010, 16:51

Forum Jump:


Users browsing this thread: 2 Guest(s)