Remove items not working
#1

Well okay I got this command to set up my items. /equip works perfectly but the /removeitems doesnt. It keeps saying that I am already un-equiped

PHP код:
if (GetPlayerTeam(playerid) == POLICE) return SendClientMessage(playeridCOLOR_RED"<!>You must be police officer in order to use this!");
    {
        if(
strcmp(cmdtext"/equip"true0) == 0)
        {
            if(
GetPVarInt(playerid"Equipped") != 0) return SendClientMessage(playeridCOLOR_INTERFACE_BODY"You are already equipped!");
            if(
GetPlayerSkin(playerid) < 280 || GetPlayerSkin(playerid) > 288) return SendClientMessage(playeridCOLOR_INTERFACE_BODY"This command is available only to the servants of the law.");
            
SetPlayerAttachedObject(playerid119142,  10.1,  0.050.0,  0.0,   0.0,   0.0);
            
SetPlayerAttachedObject(playerid219141,  20.110.0,  0.0,  0.0,   0.0,   0.0);
            
SetPlayerAttachedObject(playerid318637130.350.0,  0.0,  0.0,   0.0180.0);
            
SetPlayerAttachedObject(playerid418642,  70.1,  0.0, -0.110.0, -90.0,  90.0);
            
GivePlayerWeapon(playerid31);
            
SetPlayerArmour(playerid100.0);
            
SetPVarInt(playerid"Equipped"1);
            
SendClientMessage(playeridCOLOR_INTERFACE_BODY"You outfits.");
            return 
1;
        }
        if(
strcmp(cmdtext"/removeitems"true0) == 0)
        {
            if(
GetPVarInt(playerid"Equipped") != 1) return SendClientMessage(playeridCOLOR_INTERFACE_BODY"You already unequipped!");
            new 
Float:ap;
            
GetPlayerArmour(playeridap);
            if(
ap 0)
            {
                
RemovePlayerAttachedObject(playerid1);
                
SetPlayerArmour(playerid0.0);
            }
            
RemovePlayerAttachedObject(playerid2);
            
RemovePlayerAttachedObject(playerid3);
            
RemovePlayerAttachedObject(playerid4);
            new 
weapons[13][2];
            for (new 
i13i++)
            {
                
GetPlayerWeaponData(playeridiweapons[i][0], weapons[i][1]);
            }
            
ResetPlayerWeapons(playerid);
            for (new 
i13i++)
            {
                if(
== 1) continue;
                
GivePlayerWeapon(playeridweapons[i][0], weapons[i][1]);
            }
            
SetPVarInt(playerid"Equipped"0);
            
SendClientMessage(playeridCOLOR_INTERFACE_BODY"You undressed and disarmed.");
            return 
1;
        }
    } 
Reply


Messages In This Thread
Remove items not working - by Squirrel - 07.07.2012, 19:02
Re: Remove items not working - by Squirrel - 07.07.2012, 19:09

Forum Jump:


Users browsing this thread: 1 Guest(s)