My /createhouse wont work.
#1

So the problem is when i type /createhouse it didnt do anything at all ! i have no idea why. Please help me .

Код:
CMD:createhouse(playerid, params[])
{
	new string[128];
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
	if(PlayerInfo[playerid][pAdmin] < 6) return SendClientMessage(playerid, COLOR_GREY, "You are not an authorized to use this command.");
	for(new idx=1; idx<MAX_HOUSES; idx++)
	{
	    if(!HouseInfo[idx][hLevel])
		{
		    // Getting Business Setup
		    new Float:X, Float:Y, Float:Z;
		    GetPlayerPos(playerid, X, Y, Z);
		    // Making Business
		    HouseInfo[idx][hLevel] = 1;
		    HouseInfo[idx][hPrice] = 99999999;
		    HouseInfo[idx][hStatus] = 0;
		    format(HouseInfo[idx][hOwner], 32, "The State");
		    HouseInfo[idx][hX] = X;
		    HouseInfo[idx][hY] = Y;
		    HouseInfo[idx][hZ] = Z;
		    HouseInfo[idx][hMoney] = 0;
		    HouseInfo[idx][hMaterials] = 0;
		    HouseInfo[idx][hWeed] = 0;
			HouseInfo[idx][hGun][0] = 0;
			HouseInfo[idx][hGunAmmo][0] = 0;
			HouseInfo[idx][hGun][1] = 0;
			HouseInfo[idx][hGunAmmo][1] = 0;
			HouseInfo[idx][hGun][2] = 0;
			HouseInfo[idx][hGunAmmo][2] = 0;
			HouseInfo[idx][hGun][3] = 0;
			HouseInfo[idx][hGunAmmo][3] = 0;
			HouseInfo[idx][hGun][4] = 0;
			HouseInfo[idx][hGunAmmo][4] = 0;
		    HouseInfo[idx][hPickup] = CreateDynamicPickup(1273, 1, HouseInfo[idx][hX], HouseInfo[idx][hY], HouseInfo[idx][hZ], 0);
            format(string, sizeof(string), "ID: %d\nHouse (Lvl: %d)\nOwner: %s\nStatus: For Sale\nPrice: $%d", idx, HouseInfo[idx][hLevel], HouseInfo[idx][hOwner], HouseInfo[idx][hPrice]);
			HouseInfo[idx][hText] = CreateDynamic3DTextLabel(string, COLOR_WHITE, HouseInfo[idx][hX], HouseInfo[idx][hY], HouseInfo[idx][hZ]+0.3, 15);
			format(string, sizeof(string), "AdmWarn: %s has created house ID %d.", RPN(playerid), idx);
			SendAdminMessage(COLOR_DARKRED, 1, string);
			Log("logs/house.log", string);
			idx = MAX_HOUSES;
		}
	}
	return 1;
}
Reply
#2

Are you an admin and logged in properly?
Reply
#3

Yes. When im not it SendsClientMessege.. But it doesnt show any warrning or error in script and it doesnt do anything in the game. I have tryd editing some of the values and strings.. nothing works :/
Reply
#4

Bump.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)