help me create the cmd /sellallhouse
#1

help me, help me how do I make cmd /sellallhouse
I have the / sellhouse but I want to make /sellallhouse but I do not pande can help create the same cmd /sellallhouse

Код:
CMD:sellhouse(playerid, params[])
{
	if(pAdmin[playerid] < 9)
	    return Error(playerid, "You are not authorized to use this command!");

	new h;
	if(sscanf(params, "d", h)) return ShowInfoBoxEx(playerid, COLOR_SYSTEM, E_CMD_USAGE_SELLHOUSE);
	if(!strcmp(hInfo[h][HouseOwner], INVALID_HOWNER_NAME, CASE_SENSETIVE)) return ShowInfoBoxEx(playerid, COLOR_SYSTEM, E_H_A_F_SALE);
	else
	{
		ShowInfoBox(playerid, I_H_SOLD, h);

		format(hInfo[h][HouseOwner], MAX_PLAYER_NAME, "%s", INVALID_HOWNER_NAME);
		format(hInfo[h][HousePassword], 30, "%s", "INVALID_HOUSE_PASSWORD");
		format(hInfo[h][HouseName], MAX_HOUSE_NAME, "%s", DEFAULT_HOUSE_NAME);
		hInfo[h][HouseStorage] = 0;
		hInfo[h][HousePrivacy] = 0;
		hInfo[h][HouseForSale] = 0;
		format(query, sizeof(query), "UPDATE houses SET hname='House For Sale!',howner='INVALID_PLAYER_ID',hpass='INVALID_HOUSE_PASSWORD',hstorage=0,hprivacy=0,last_visited=0,hforsale=0 WHERE house_id=%d", h);
		MySQL_updateQuery(query);

		foreach(Player, i)
		{
  			if(IsPlayerInHouse(i, h))
	    	{
      			ExitHouse(i, h);
				ShowInfoBoxEx(i, COLOR_INFO, I_TO_PLAYERS_HSOLD);
	    	}
		}
		DestroyDynamicMapIcon(HouseMIcon[h]);
		HouseMIcon[h] = CreateDynamicMapIcon(hInfo[h][CPOutX], hInfo[h][CPOutY], hInfo[h][CPOutZ], 31, -1, 0, 0, -1, MICON_VD);
		UpdateHouseText(h);
	}
    return 1;
}
Reply


Messages In This Thread
help me create the cmd /sellallhouse - by gogo45 - 18.11.2016, 09:09
Re: help me create the cmd /sellallhouse - by gogo45 - 18.11.2016, 13:41
Re: help me create the cmd /sellallhouse - by gogo45 - 18.11.2016, 15:06
Re: help me create the cmd /sellallhouse - by gogo45 - 20.11.2016, 10:16
Re: help me create the cmd /sellallhouse - by BiosMarcel - 20.11.2016, 10:19
Re: help me create the cmd /sellallhouse - by Yaa - 20.11.2016, 10:24
Re: help me create the cmd /sellallhouse - by gogo45 - 20.11.2016, 11:45

Forum Jump:


Users browsing this thread: 1 Guest(s)