SA-MP Forums Archive
[FilterScript] Weapon Spawner For DM - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Weapon Spawner For DM (/showthread.php?tid=410993)



Weapon Spawner For DM - faiznurfaza - 27.01.2013

Second Filterscript by Me
Need Include :
PHP Code:
#include <a_samp>
#include <zcmd>
#include <color> 
PHP Code:
#include <a_samp>
#include <zcmd>
#include <color>
#define weapon_spawner 0
#define page2 1
#define page3 2
#define page4 3
public OnFilterScriptInit()
{
   print(
"Weapon Spawner By Faiz");
   return 
1;
}
public 
OnFilterScriptExit()
{
   print(
"Weapon Spawner By Faiz");
   return 
1;
}
CMD:weapon(playeridparams[])
{
     
ShowPlayerDialog(playeridweapon_spawnerDIALOG_STYLE_LIST"Weapons Page 1""Katana\n Baseball Bat\n ChainSaw\n Next Page""Select""Cancel");
     return 
1;
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == weapon_spawner)
    {
        if(
response)
        {
            if(
listitem == 0)
            {
                
GivePlayerWeapon(playerid81);
                
SendClientMessage(playeridCOLOR_RED"You Spawn Katana");
            }
            if(
listitem == 1)
            {
                
GivePlayerWeapon(playerid51);
                
SendClientMessage(playeridCOLOR_RED"You Spawn Baseball Bat");
            }
            if(
listitem == 2)
            {
                
GivePlayerWeapon(playerid91);
                
SendClientMessage(playeridCOLOR_RED"You Spawn Chainsaw");
            }
            if(
listitem == 3)
            {
                
ShowPlayerDialog(playeridpage2DIALOG_STYLE_LIST"Weapons Page 2""Ak47\nM4\nMinigun\nGrenade\nNext Page""Select""Cancel");
         }
        }
    }
    if(
dialogid == page2)
    {
        if(
response)
        {
            if(
listitem == 0)
            {
                
GivePlayerWeapon(playerid30100);
                
SendClientMessage(playeridCOLOR_RED"You Spawn AK47");
            }
            if(
listitem == 1)
            {
                
GivePlayerWeapon(playerid31100);
                
SendClientMessage(playeridCOLOR_RED"You Spawn M4");
            }
            if(
listitem == 2)
            {
                
GivePlayerWeapon(playerid38100);
                
SendClientMessage(playeridCOLOR_RED"You Spawn Minigun");
            }
            if(
listitem == 3)
            {
                
GivePlayerWeapon(playerid16100);
                
SendClientMessage(playeridCOLOR_RED"You Spawn Grenade");
         }
            if(
listitem == 4)
            {
                
ShowPlayerDialog(playeridpage3DIALOG_STYLE_LIST"Weapons Page 3""Pistol\nSawnoff Shotgun\nMP5\nRPG\nNext Page""Select""Cancel");
         }
        }
    }
    return 
1;