command help
#1

its /hdeposit weapon [slot] now
i need to make it /hdeposit weapon [slot] [bullet ammount] but its not working for me


Anyone can help me with this?

pawn Код:
CMD:hwithdraw(playerid, params[])
{
    new string[128], option[32], amount;
    new idx = PlayerInfo[playerid][pHouse];
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(!PlayerInfo[playerid][pHouse] && !PlayerInfo[playerid][pVHouse]) return SendClientMessage(playerid, COLOR_GREY, "You don't own a house.");
    if(GetPlayerVirtualWorld(playerid)-500 != idx && !PlayerInfo[playerid][pVHouse]) return SendClientMessage(playerid, COLOR_GREY, "You are not inside your house.");
    if(GetPlayerVirtualWorld(playerid)-500 != idx && PlayerInfo[playerid][pVHouse])
    {
        idx = PlayerInfo[playerid][pVHouse];
        if(GetPlayerVirtualWorld(playerid)-500 != idx) return SendClientMessage(playerid, COLOR_GREY, "You are not inside your house.");
    }
    if(sscanf(params, "s[32]", option))
    {
        SendClientMessage(playerid, COLOR_WHITE, "USAGE: /hdeposit [item]");
        SendClientMessage(playerid, COLOR_GREY, "ITEMS: 1) money | 2) weapon | 3) weed | 4) crack");
        format(string, sizeof(string), "SAFE: $%d | %d Weed | %d Crack", HouseInfo[idx][hMoney], HouseInfo[idx][hWeed], HouseInfo[idx][hCrack]);
        SendClientMessage(playerid, COLOR_WHITE, string);
        format(string, sizeof(string), "SAFE: Weapon 1: %s (%d Ammo) | Weapon 2: %s (%d Ammo) | Weapon 3: %s (%d Ammo)", RWN(HouseInfo[idx][hGun][0]), HouseInfo[idx][hGunAmmo][0], RWN(HouseInfo[idx][hGun][1]), HouseInfo[idx][hGunAmmo][1], RWN(HouseInfo[idx][hGun][2]), HouseInfo[idx][hGunAmmo][2]);
        SendClientMessage(playerid, COLOR_WHITE, string);
        format(string, sizeof(string), "SAFE: Weapon 4: %s (%d Ammo) | Weapon 5: %s (%d Ammo)", RWN(HouseInfo[idx][hGun][3]), HouseInfo[idx][hGunAmmo][3], RWN(HouseInfo[idx][hGun][4]), HouseInfo[idx][hGunAmmo][4]);
        SendClientMessage(playerid, COLOR_WHITE, string);
        return 1;
    }
    if(!strcmp(option, "weapon", true, 4))
    {
        if(sscanf(params, "s[32]i", option, amount)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /hdeposit weapon [slot]");
        if(amount < 1 || amount > 5) return SendClientMessage(playerid, COLOR_GREY, "Weapon slots are between 1 and 5.");
        amount = amount-1;
        if(!HouseInfo[idx][hGun][amount]) return SendClientMessage(playerid, COLOR_GREY, "You don't have a weapon in this slot.");
        GiveZaiatWeapon(playerid, HouseInfo[idx][hGun][amount], HouseInfo[idx][hGunAmmo][amount]);
        format(string, sizeof(string), "* %s opens their vault, takes a %s closes it.", RPN(playerid), RWN(HouseInfo[idx][hGun][amount]));
        SendNearbyMessage(playerid, 15, string, COLOR_LIGHTBLUE, COLOR_LIGHTBLUE, COLOR_LIGHTBLUE, COLOR_LIGHTBLUE, COLOR_LIGHTBLUE);
        HouseInfo[idx][hGun][amount] = 0;
        HouseInfo[idx][hGunAmmo][amount] = 0;
    }
Reply
#2

help?
Reply
#3

Bump
Reply
#4

Bump
Reply
#5

help me
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)