[FilterScript] Little SIMPLE Weapon Spawner
#1

This is my FIRST OWN filterscript.It is perfect for DM servers,you can edit it or add for minigame.At time i will Update it to make it cooler and more useful


Version V.1 Newest
pawn Код:
#include <a_samp>

#define DIALOG_WEAPON 4567

main()
{
    print("\n----------------------------------");
    print(" Weapon giver by Kittylol");
    print("----------------------------------\n");
}

public OnGameModeInit()
{
    // Don't use these lines if it's a filterscript
    SetGameModeText("Weapon giver by Kittylol");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
}

public OnGameModeExit()
{
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/weapon", true))
    {
        ShowPlayerDialog(playerid, DIALOG_WEAPON, DIALOG_STYLE_LIST, "[-----Weapon Spawner-----]", "Knife\nBat\nChainsaw\nPistol\nDeagle\nShotgun\nMicroUzi\nMinigun\nRocketLauncher\nThermal******s", "Take", "Close");
        return 1;
    }
    return 0;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
        case DIALOG_WEAPON:
        {
            switch(listitem)
            {
                case 0: return GivePlayerWeapon(playerid, 4, 9999);
                case 1: return GivePlayerWeapon(playerid, 5, 9999);
                case 2: return GivePlayerWeapon(playerid, 9, 9999);
                case 3: return GivePlayerWeapon(playerid, 22, 9999);
                case 4: return GivePlayerWeapon(playerid, 24, 9999);
                case 5: return GivePlayerWeapon(playerid, 25, 9999);
                case 6: return GivePlayerWeapon(playerid, 28, 9999);
                case 7: return GivePlayerWeapon(playerid, 38, 9999);
                case 8: return GivePlayerWeapon(playerid, 36, 9999);
                case 9: return GivePlayerWeapon(playerid, 45, 9999);
            }
        }
    }
    return 1;
}
Reply
#2

Good for your first one
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)