Problem with weapon ammu.
#1

hello there samp community, i am having problem with this oskin cmd the problem is when someone uses it, it is giving more ammo of the weapon, i want that if the player is holding the weapon then it should not give him more ammu of that weapon. here is the code.

pawn Код:
CMD:oskin(playerid, params[])
{
    if (PlayerOrg[playerid] == 0) return SendClientMessage(playerid, COLOR_RED,"You are not a member of an organization");
    {
        if (PlayerOrg[playerid] == 1)
        {
            if(GetPlayerSkin(playerid) != 108)
            {
                SetPlayerSkin(playerid,108);
                SetPlayerColor(playerid,COLOR_YELLOW);
                {
                if(GetPlayerWeapon(playerid) != 5 && GetPlayerWeapon(playerid) !=32)
                GivePlayerWeapon(playerid,5,1);
                GivePlayerWeapon(playerid,32,350);
                }
                SetPlayerArmour(playerid, 100);
                SendClientMessage(playerid,COLOR_YELLOW,"You have changed to your First organization skin!");
                return 1;
            }
            if(GetPlayerSkin(playerid) == 108)
            {
                SetPlayerSkin(playerid,109);
                SetPlayerColor(playerid,COLOR_YELLOW);
                SendClientMessage(playerid,COLOR_YELLOW,"You have changed to your second organization skin!");
                SetPlayerArmour(playerid, 100);
                {
                if(GetPlayerWeapon(playerid) != 5 && GetPlayerWeapon(playerid) !=32)
                GivePlayerWeapon(playerid,5,1);
                GivePlayerWeapon(playerid,32,350);
                }
                return 1;
            }
        }
    }
    return 1;
}
Reply
#2

i think you should use GetPlayerArmedWeapon
Reply
#3

Quote:
Originally Posted by dalkgamler
Посмотреть сообщение
i think you should use GetPlayerArmedWeapon
never used this before can you show me with my code?
Reply
#4

http://forum.sa-mp.com/showpost.php?...59&postcount=6
Reply
#5

i think its if(GetPlayerArmedWeapon(playerid)==weaponid)
Reply
#6

oh sorry i thougt you mean something else
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)