How to add weapons in ammu
#1

How to add samo more weapon types to sell in ammu nation
Reply
#2

i suggest u to use
https://sampwiki.blast.hk/wiki/Weapons
https://sampwiki.blast.hk/wiki/ShowPlayerDialog
https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint
Reply
#3

hmm thanks for trying to help but i didnt asked for Id-s off weapons i asked how to put themm i ammu nation for sale
Reply
#4

u want it on Dialog ?
or onPickup ?
Reply
#5

On dialog when i tipe /buygun

and if you make me one example how to add gunpack i organizations,mafias, so members can take gun in their safehouse
Reply
#6

okay . .
Reply
#7

pawn Код:
#include <a_samp>
#include <zcmd>

#define red 0xFF0000AA
#define DIALOG_WEAPON 1

CMD:buygun(playerid, params[])
{
    ShowPlayerDialog(playerid, DIALOG_WEAPON, DIALOG_STYLE_LIST, "Weapon Menu", "M4\nAK47\nSniper Rifle\nCombat Shotgun\nSawnoff Shotgun", "Buygun", "Cancel");
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_WEAPON)
    {
        switch(listitem)
        {
            case 0:
            {
                if(GetPlayerMoney(playerid) <300)
                return SendClientMessage(playerid, red, "[SYSTEM]:You dont have enough money to buy this M4 for $300!");
                GivePlayerMoney(playerid, -300);
                GivePlayerWeapon(playerid, 31, 250);
                SendClientMessage(playerid, red, "You have purchase this weapon!");
            }
            case 1:
            {
                if(GetPlayerMoney(playerid) <300)
                return SendClientMessage(playerid, red, "[SYSTEM]:You dont have enough money to buy this AK47 for $300!");
                GivePlayerMoney(playerid, -300);
                GivePlayerWeapon(playerid, 30, 250);
                SendClientMessage(playerid, red, "You have purchase this weapon!");
            }
            case 2:
            {
                if(GetPlayerMoney(playerid) <250)
                return SendClientMessage(playerid, red, "[SYSTEM]:You dont have enough money to buy this Sniper Rifle for $250!");
                GivePlayerMoney(playerid, -250);
                GivePlayerWeapon(playerid, 34, 50);
                SendClientMessage(playerid, red, "You have purchase this weapon!");
            }
            case 3:
            {
                if(GetPlayerMoney(playerid) <270)
                return SendClientMessage(playerid, red, "[SYSTEM]:You dont have enough money to buy this Combat Shotgun for $270!");
                GivePlayerMoney(playerid, -270);
                GivePlayerWeapon(playerid, 27, 100);
                SendClientMessage(playerid, red, "You have purchase this weapon!");
            }
            case 4:
            {
                if(GetPlayerMoney(playerid) <290)
                return SendClientMessage(playerid, red, "[SYSTEM]:You dont have enough money to buy this Sawnoff Shotgun for $290!");
                GivePlayerMoney(playerid, -290);
                GivePlayerWeapon(playerid, 26, 150);
                SendClientMessage(playerid, red, "You have purchase this weapon!");
            }
        }
    }
    return 1;
}
Reply
#8

Quote:
Originally Posted by Devilxz97
Посмотреть сообщение
pawn Код:
#include <a_samp>
#include <zcmd>

#define red 0xFF0000AA
#define DIALOG_WEAPON 1

CMD:buygun(playerid, params[])
{
    ShowPlayerDialog(playerid, DIALOG_WEAPON, DIALOG_STYLE_LIST, "Weapon Menu", "M4\nAK47\nSniper Rifle\nCombat Shotgun\nSawnoff Shotgun", "Buygun", "Cancel");
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_WEAPON)
    {
        switch(listitem)
        {
            case 0:
            {
                if(GetPlayerMoney(playerid) <300)
                return SendClientMessage(playerid, red, "[SYSTEM]:You dont have enough money to buy this M4 for $300!");
                GivePlayerMoney(playerid, -300);
                GivePlayerWeapon(playerid, 31, 250);
                SendClientMessage(playerid, red, "You have purchase this weapon!");
            }
            case 1:
            {
                if(GetPlayerMoney(playerid) <300)
                return SendClientMessage(playerid, red, "[SYSTEM]:You dont have enough money to buy this AK47 for $300!");
                GivePlayerMoney(playerid, -300);
                GivePlayerWeapon(playerid, 30, 250);
                SendClientMessage(playerid, red, "You have purchase this weapon!");
            }
            case 2:
            {
                if(GetPlayerMoney(playerid) <250)
                return SendClientMessage(playerid, red, "[SYSTEM]:You dont have enough money to buy this Sniper Rifle for $250!");
                GivePlayerMoney(playerid, -250);
                GivePlayerWeapon(playerid, 34, 50);
                SendClientMessage(playerid, red, "You have purchase this weapon!");
            }
            case 3:
            {
                if(GetPlayerMoney(playerid) <270)
                return SendClientMessage(playerid, red, "[SYSTEM]:You dont have enough money to buy this Combat Shotgun for $270!");
                GivePlayerMoney(playerid, -270);
                GivePlayerWeapon(playerid, 27, 100);
                SendClientMessage(playerid, red, "You have purchase this weapon!");
            }
            case 4:
            {
                if(GetPlayerMoney(playerid) <290)
                return SendClientMessage(playerid, red, "[SYSTEM]:You dont have enough money to buy this Sawnoff Shotgun for $290!");
                GivePlayerMoney(playerid, -290);
                GivePlayerWeapon(playerid, 26, 150);
                SendClientMessage(playerid, red, "You have purchase this weapon!");
            }
        }
    }
    return 1;
}
Tnx and can you make me 1 example of puting gunpack in org so the members can take gun in the safehouse...
Reply
#9

i can make 1 example , this is on Pickup give me a mins
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)