Object won't attach to player
#2

pawn Код:
if(!strcmp("/holster", cmdtext, true, 10))
    {
        if(IsPlayerConnected(playerid))
        {
            new weaponid = GetPlayerWeapon(playerid);
            new wname[16];
            GetWeaponName(weaponid, wname, 16);
            if((IsPlayerAttachedObjectSlotUsed(playerid, 1) && PlayerInfo[playerid][pDonator] == 0) || (IsPlayerAttachedObjectSlotUsed(playerid, 1) && PlayerInfo[playerid][pDonator] > 0 && 8 != weaponid) || (IsPlayerAttachedObjectSlotUsed(playerid, 1) && IsPlayerAttachedObjectSlotUsed(playerid, 2) && PlayerInfo[playerid][pDonator] > 0))
            {
                RemovePlayerAttachedObject(playerid, 1);
                if(IsPlayerAttachedObjectSlotUsed(playerid, 2))
                {
                    RemovePlayerAttachedObject(playerid, 2);
                }
                return 1;
            }
            if(IsPlayerAttachedObjectSlotUsed(playerid, 1) && weaponid == 8 && PlayerInfo[playerid][pDonator] > 0)
            {
                SetPlayerAttachedObject(playerid, 2, 339, 1, 1049582633, 3182973285, 1041193958, 1127153664, 3263430656, 1088421888, 1065353216, 1065353216, 1065353216);
                return 1;
            }
           
            if(weaponid == 8 || weaponid == 25 || weaponid == 27 || weaponid == 29 || weaponid == 30 || weaponid == 31 || weaponid == 33 || weaponid == 34)
            {
                if(weaponid == 8) {SetPlayerAttachedObject(playerid, 1, 339, 1, 1049918144, 3190690939, 3190690939, 3242196992, 3263823872, 3225419776, 1065353216, 1065353216, 1065353216);}
                if(weaponid == 25) {SetPlayerAttachedObject(playerid, 1, 349, 1, 1045220557, 3187671040, 3184315597, 0, 1103626240, 1127481344, 1065353216, 1065353216, 1065353216);}
                if(weaponid == 27) {SetPlayerAttachedObject(playerid, 1, 351, 1, 1045220557, 3187671040, 3184315597, 0, 1103626240, 1127481344, 1065353216, 1065353216, 1065353216);}
                if(weaponid == 29) {SetPlayerAttachedObject(playerid, 1, 353, 1, 1045220557, 3187671040, 3184315597, 0, 1103626240, 1127481344, 1065353216, 1065353216, 1065353216);}
                if(weaponid == 30) {SetPlayerAttachedObject(playerid, 1, 355, 1, 1045220557, 3187671040, 3184315597, 0, 1103626240, 1127481344, 1065353216, 1065353216, 1065353216);}
                if(weaponid == 31) {SetPlayerAttachedObject(playerid, 1, 356, 1, 1045220557, 3187671040, 3184315597, 0, 1103626240, 1127481344, 1065353216, 1065353216, 1065353216);}
                if(weaponid == 33) {SetPlayerAttachedObject(playerid, 1, 357, 1, 1045220557, 3187671040, 3184315597, 0, 1103626240, 1127481344, 1065353216, 1065353216, 1065353216);}
                if(weaponid == 34) {SetPlayerAttachedObject(playerid, 1, 358, 1, 1045220557, 3187671040, 3184315597, 0, 1103626240, 1127481344, 1065353216, 1065353216, 1065353216);}
           
                if(PlayerInfo[playerid][pSex] == 1)
                {
                    format(string, 256, "holsters his %s.", wname);
                    PlayerActionMessage(playerid, 20.0, string);
                }
                else
                {
                    format(string, 256, "holsters her %s.", wname);
                    PlayerActionMessage(playerid, 20.0, string);
                }
                return 1// I don't think so you need this return 1. I guess delete it and than try.
            }
            else
            {
                SendClientMessage(playerid, COLOR_ORANGE, "[ERROR:] You're not holding a valid weapon in your hands.");
                return 1;
            }
        }
        return 1;
    }
Reply


Messages In This Thread
Object won't attach to player - by Makaveli93 - 23.06.2012, 14:29
Re: Object won't attach to player - by nilanjay - 23.06.2012, 14:59
Re: Object won't attach to player - by Makaveli93 - 23.06.2012, 15:11
Re: Object won't attach to player - by Jonny5 - 23.06.2012, 15:15
Re: Object won't attach to player - by Makaveli93 - 23.06.2012, 15:18
Re: Object won't attach to player - by Jonny5 - 23.06.2012, 15:34
Re: Object won't attach to player - by Makaveli93 - 23.06.2012, 16:31
Re: Object won't attach to player - by SuperViper - 23.06.2012, 16:35
Re: Object won't attach to player - by Makaveli93 - 23.06.2012, 16:39

Forum Jump:


Users browsing this thread: 1 Guest(s)