24.05.2016, 13:05
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 h = 1; h < sizeof(HouseInfo); h++)
{
if(hworld == HouseInfo[h][hInsideWorld])
{
if(house == HouseInfo[h][hInsideWorld])
{
new
slot, playergun, playerammo;
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(playerid, playergun);
GetWeaponName(playergun, gunname, sizeof(gunname));
SendServerMessage(playerid, "You have put your %s in slot 1.", gunname);
SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, "places a weapon in the house vault.");
new file4[40];
format(file4, sizeof(file4), HPATH, h);
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(playerid, playergun);
GetWeaponName(playergun, gunname, sizeof(gunname));
SendServerMessage(playerid, "You have put your %s in slot 2.", gunname);
SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, "places a weapon in the house vault.");
new file4[40];
format(file4, sizeof(file4), HPATH, h);
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(playerid, playergun);
GetWeaponName(playergun, gunname, sizeof(gunname));
SendServerMessage(playerid, "You have put your %s in slot 3.", gunname);
SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, "places a weapon in the house vault.");
new file4[40];
format(file4, sizeof(file4), HPATH, h);
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(playerid, playergun);
GetWeaponName(playergun, gunname, sizeof(gunname));
SendServerMessage(playerid, "You have put your %s in slot 4.", gunname);
SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, "places a weapon in the house vault.");
new file4[40];
format(file4, sizeof(file4), HPATH, h);
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(playerid, playergun);
GetWeaponName(playergun, gunname, sizeof(gunname));
SendServerMessage(playerid, "You have put your %s in slot 5.", gunname);
SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, "places a weapon in the house vault.");
new file4[40];
format(file4, sizeof(file4), HPATH, h);
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(playerid, playergun);
GetWeaponName(playergun, gunname, sizeof(gunname));
SendServerMessage(playerid, "You have put your %s in slot 6.", gunname);
SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, "places a weapon in the house vault.");
new file4[40];
format(file4, sizeof(file4), HPATH, h);
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(playerid, playergun);
GetWeaponName(playergun, gunname, sizeof(gunname));
SendServerMessage(playerid, "You have put your %s in slot 7.", gunname);
SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, "places a weapon in the house vault.");
new file4[40];
format(file4, sizeof(file4), HPATH, h);
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(playerid, playergun);
GetWeaponName(playergun, gunname, sizeof(gunname));
SendServerMessage(playerid, "You have put your %s in slot 8.", gunname);
SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, "places a weapon in the house vault.");
new file4[40];
format(file4, sizeof(file4), HPATH, h);
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(playerid, playergun);
GetWeaponName(playergun, gunname, sizeof(gunname));
SendServerMessage(playerid, "You have put your %s in slot 9.", gunname);
SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, "places a weapon in the house vault.");
new file4[40];
format(file4, sizeof(file4), HPATH, h);
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(playerid, playergun);
GetWeaponName(playergun, gunname, sizeof(gunname));
SendServerMessage(playerid, "You have put your %s in slot 10.", gunname);
SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, "places a weapon in the house vault.");
new file4[40];
format(file4, sizeof(file4), HPATH, h);
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);