CMD help
#1

When i type the cmd nothing happends maybe u guys can help me out.


PHP код:
else if(strcmp(choose"putgun"true) == 0)
        {
            new 
hworld GetPlayerVirtualWorld(playerid);
            new 
house PlayerInfo[playerid][HouseID];
            if(
house == 0) return SendErrorMessage(playerid"You don't own any house.");
            for(new 
1sizeof(HouseInfo); h++)
            {
                if(
hworld == HouseInfo[h][hInsideWorld])
                {
                    if(
house == HouseInfo[h][hInsideWorld])
                    {
                        new
                        
slotplayergunplayerammo;
                        
playergun GetPlayerWeapon(playerid);
                        
playerammo GetPlayerAmmo(playerid);
                        if(
playergun 1) return SendErrorMessage(playerid"You do not have a weapon.");
                        if(
playerammo 1) return SendErrorMessage(playerid"You do not have any ammo.");
                        if(
sscanf(params,"d"slot)) return SendSyntaxMessage(playerid"Usage: /putgun [slot].");
                        if(
slot == 1)
                        {
                            if(
HouseInfo[h][hWeapon1] != 0) return SendErrorMessage(playerid"There is already a weapon in this slot.");
                            
HouseInfo[h][hWeapon1] = playergun;
                            
HouseInfo[h][hAmmo1] += playerammo;
                            
RemovePlayerWeapon(playeridplayergun);
                            
GetWeaponName(playergungunnamesizeof(gunname));
                            
SendServerMessage(playerid"You have put your %s in slot 1."gunname);
                            
SendNearbyMessage(playerid30.0COLOR_PURPLE"places a weapon in the house vault.");
                            new 
file4[40];
                            
format(file4sizeof(file4), HPATHh);
                            new 
INI:File INI_Open(file4);
                            
INI_SetTag(File,"data");
                            
INI_WriteInt(File,"hWeapon1"HouseInfo[h][hWeapon1]);
                            
INI_WriteInt(File,"hAmmo1"HouseInfo[h][hAmmo1]);
                            
INI_Close(File);
                            return 
1;
                        }
                        else if(
slot == 2)
                        {
                            if(
HouseInfo[h][hWeapon2] != 0) return SendErrorMessage(playerid"There is already a weapon in this slot.");
                            
HouseInfo[h][hWeapon2] = playergun;
                            
HouseInfo[h][hAmmo2] += playerammo;
                            
RemovePlayerWeapon(playeridplayergun);
                            
GetWeaponName(playergungunnamesizeof(gunname));
                            
SendServerMessage(playerid"You have put your %s in slot 2."gunname);
                            
SendNearbyMessage(playerid30.0COLOR_PURPLE,  "places a weapon in the house vault.");
                            new 
file4[40];
                            
format(file4sizeof(file4), HPATHh);
                            new 
INI:File INI_Open(file4);
                            
INI_SetTag(File,"data");
                            
INI_WriteInt(File,"hWeapon2"HouseInfo[h][hWeapon2]);
                            
INI_WriteInt(File,"hAmmo2"HouseInfo[h][hAmmo2]);
                            
INI_Close(File);
                            return 
1;
                        }
                        else if(
slot == 3)
                        {
                            if(
HouseInfo[h][hWeapon3] != 0) return SendErrorMessage(playerid"There is already a weapon in this slot.");
                            
HouseInfo[h][hWeapon3] = playergun;
                            
HouseInfo[h][hAmmo3] += playerammo;
                            
RemovePlayerWeapon(playeridplayergun);
                            
GetWeaponName(playergungunnamesizeof(gunname));
                            
SendServerMessage(playerid"You have put your %s in slot 3."gunname);
                            
SendNearbyMessage(playerid30.0COLOR_PURPLE,  "places a weapon in the house vault.");
                            new 
file4[40];
                            
format(file4sizeof(file4), HPATHh);
                            new 
INI:File INI_Open(file4);
                            
INI_SetTag(File,"data");
                            
INI_WriteInt(File,"hWeapon3"HouseInfo[h][hWeapon3]);
                            
INI_WriteInt(File,"hAmmo3"HouseInfo[h][hAmmo3]);
                            
INI_Close(File);
                            return 
1;
                        }
                        else if(
slot == 4)
                        {
                            if(
HouseInfo[h][hWeapon4] != 0) return SendErrorMessage(playerid"There is already a weapon in this slot.");
                            
HouseInfo[h][hWeapon4] = playergun;
                            
HouseInfo[h][hAmmo4] += playerammo;
                            
RemovePlayerWeapon(playeridplayergun);
                            
GetWeaponName(playergungunnamesizeof(gunname));
                            
SendServerMessage(playerid"You have put your %s in slot 4."gunname);
                            
SendNearbyMessage(playerid30.0COLOR_PURPLE,  "places a weapon in the house vault.");
                            new 
file4[40];
                            
format(file4sizeof(file4), HPATHh);
                            new 
INI:File INI_Open(file4);
                            
INI_SetTag(File,"data");
                            
INI_WriteInt(File,"hWeapon4"HouseInfo[h][hWeapon4]);
                            
INI_WriteInt(File,"hAmmo4"HouseInfo[h][hAmmo4]);
                            
INI_Close(File);
                            return 
1;
                        }
                        if(
slot == 5)
                        {
                            if(
HouseInfo[h][hWeapon5] != 0) return SendErrorMessage(playerid"There is already a weapon in this slot.");
                            
HouseInfo[h][hWeapon5] = playergun;
                            
HouseInfo[h][hAmmo5] += playerammo;
                            
RemovePlayerWeapon(playeridplayergun);
                            
GetWeaponName(playergungunnamesizeof(gunname));
                            
SendServerMessage(playerid"You have put your %s in slot 5."gunname);
                            
SendNearbyMessage(playerid30.0COLOR_PURPLE,  "places a weapon in the house vault.");
                            new 
file4[40];
                            
format(file4sizeof(file4), HPATHh);
                            new 
INI:File INI_Open(file4);
                            
INI_SetTag(File,"data");
                            
INI_WriteInt(File,"hWeapon5"HouseInfo[h][hWeapon5]);
                            
INI_WriteInt(File,"hAmmo5"HouseInfo[h][hAmmo5]);
                            
INI_Close(File);
                            return 
1;
                        }
                        else if(
slot == 6)
                        {
                            if(
HouseInfo[h][hWeapon6] != 0) return SendErrorMessage(playerid"There is already a weapon in this slot.");
                            
HouseInfo[h][hWeapon6] = playergun;
                            
HouseInfo[h][hAmmo6] += playerammo;
                            
RemovePlayerWeapon(playeridplayergun);
                            
GetWeaponName(playergungunnamesizeof(gunname));
                            
SendServerMessage(playerid"You have put your %s in slot 6."gunname);
                            
SendNearbyMessage(playerid30.0COLOR_PURPLE,  "places a weapon in the house vault.");
                            new 
file4[40];
                            
format(file4sizeof(file4), HPATHh);
                            new 
INI:File INI_Open(file4);
                            
INI_SetTag(File,"data");
                            
INI_WriteInt(File,"hWeapon6"HouseInfo[h][hWeapon6]);
                            
INI_WriteInt(File,"hAmmo6"HouseInfo[h][hAmmo6]);
                            
INI_Close(File);
                            return 
1;
                        }
                        else if(
slot == 7)
                        {
                            if(
HouseInfo[h][hWeapon7] != 0) return SendErrorMessage(playerid"There is already a weapon in this slot.");
                            
HouseInfo[h][hWeapon7] = playergun;
                            
HouseInfo[h][hAmmo7] += playerammo;
                            
RemovePlayerWeapon(playeridplayergun);
                            
GetWeaponName(playergungunnamesizeof(gunname));
                            
SendServerMessage(playerid"You have put your %s in slot 7."gunname);
                            
SendNearbyMessage(playerid30.0COLOR_PURPLE,  "places a weapon in the house vault.");
                            new 
file4[40];
                            
format(file4sizeof(file4), HPATHh);
                            new 
INI:File INI_Open(file4);
                            
INI_SetTag(File,"data");
                            
INI_WriteInt(File,"hWeapon7"HouseInfo[h][hWeapon7]);
                            
INI_WriteInt(File,"hAmmo7"HouseInfo[h][hAmmo7]);
                            
INI_Close(File);
                            return 
1;
                        }
                        else if(
slot == 8)
                        {
                            if(
HouseInfo[h][hWeapon8] != 0) return SendErrorMessage(playerid"There is already a weapon in this slot.");
                            
HouseInfo[h][hWeapon8] = playergun;
                            
HouseInfo[h][hAmmo8] += playerammo;
                            
RemovePlayerWeapon(playeridplayergun);
                            
GetWeaponName(playergungunnamesizeof(gunname));
                            
SendServerMessage(playerid"You have put your %s in slot 8."gunname);
                            
SendNearbyMessage(playerid30.0COLOR_PURPLE,  "places a weapon in the house vault.");
                            new 
file4[40];
                            
format(file4sizeof(file4), HPATHh);
                            new 
INI:File INI_Open(file4);
                            
INI_SetTag(File,"data");
                            
INI_WriteInt(File,"hWeapon4"HouseInfo[h][hWeapon4]);
                            
INI_WriteInt(File,"hAmmo4"HouseInfo[h][hAmmo4]);
                            
INI_Close(File);
                            return 
1;
                        }
                        else if(
slot == 9)
                        {
                            if(
HouseInfo[h][hWeapon9] != 0) return SendErrorMessage(playerid"There is already a weapon in this slot.");
                            
HouseInfo[h][hWeapon9] = playergun;
                            
HouseInfo[h][hAmmo9] += playerammo;
                            
RemovePlayerWeapon(playeridplayergun);
                            
GetWeaponName(playergungunnamesizeof(gunname));
                            
SendServerMessage(playerid"You have put your %s in slot 9."gunname);
                            
SendNearbyMessage(playerid30.0COLOR_PURPLE,  "places a weapon in the house vault.");
                            new 
file4[40];
                            
format(file4sizeof(file4), HPATHh);
                            new 
INI:File INI_Open(file4);
                            
INI_SetTag(File,"data");
                            
INI_WriteInt(File,"hWeapon9"HouseInfo[h][hWeapon9]);
                            
INI_WriteInt(File,"hAmmo9"HouseInfo[h][hAmmo9]);
                            
INI_Close(File);
                            return 
1;
                        }
                        else if(
slot == 10)
                        {
                            if(
HouseInfo[h][hWeapon10] != 0) return SendErrorMessage(playerid"There is already a weapon in this slot.");
                            
HouseInfo[h][hWeapon10] = playergun;
                            
HouseInfo[h][hAmmo10] += playerammo;
                            
RemovePlayerWeapon(playeridplayergun);
                            
GetWeaponName(playergungunnamesizeof(gunname));
                            
SendServerMessage(playerid"You have put your %s in slot 10."gunname);
                            
SendNearbyMessage(playerid30.0COLOR_PURPLE,  "places a weapon in the house vault.");
                            new 
file4[40];
                            
format(file4sizeof(file4), HPATHh);
                            new 
INI:File INI_Open(file4);
                            
INI_SetTag(File,"data");
                            
INI_WriteInt(File,"hWeapon10"HouseInfo[h][hWeapon10]);
                            
INI_WriteInt(File,"hAmmo10"HouseInfo[h][hAmmo10]);
                            
INI_Close(File); 
Reply


Messages In This Thread
CMD help - by N0FeaR - 24.05.2016, 13:05
Re: CMD help - by lwilson - 24.05.2016, 15:04
Re: CMD help - by DRP - 24.05.2016, 15:43
Re: CMD help - by Dayrion - 24.05.2016, 17:17
Re: CMD help - by Stinged - 24.05.2016, 18:06
Re: CMD help - by N0FeaR - 24.05.2016, 19:38

Forum Jump:


Users browsing this thread: 1 Guest(s)