PDA

View Full Version : /hnext bugged


ConnorFisher
04/12/2013, 04:45 PM
Hey guys, as the title says my /hnext is bugged, or it's not scripted how I want it.
If I place a house, which is not bought yet and do /hnext it still says the same as the previous one.
But when someone buys the house, it goes one further.
Is it possible to make when you place one, /hedit exterior (nexthouseid) to get at /hnext the next one?

here's my current code


CMD:hnext(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pShopTech] == 1)
{
SendClientMessageEx(playerid, COLOR_RED, "* Listing next available house...");
for(new x;x<MAX_HOUSES;x++)
{
if(HouseInfo[x][hOwned] == 0)
{
new string[128];
format(string, sizeof(string), "%d is available to use.", x);
SendClientMessageEx(playerid, COLOR_WHITE, string);
break;
}
}
}
else
{
SendClientMessageEx(playerid, COLOR_GRAD2, "You are not authorized to use that command!");
return 1;
}
return 1;
}

Dorlevi1506
04/12/2013, 08:57 PM
Try this :

CMD:hnext(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pShopTech] == 1)
{
SendClientMessageEx(playerid, COLOR_RED, "* Listing next available house...");
for(new x;x<MAX_HOUSES;x++)
{
if(HouseInfo[x][hOwned] == 0)
{
new string[128];
format(string, sizeof(string), "%d is available to use.", x);
SendClientMessageEx(playerid, COLOR_WHITE, string);
break;
}
}
}
else
{
SendClientMessageEx(playerid, COLOR_GRAD2, "You are not authorized to use that command!");
return 1;
}
return 1;
}

ConnorFisher
05/12/2013, 01:05 PM
that is exactly the same

Akira297
05/12/2013, 01:08 PM
You're requesting assistance on the Next Generation Gaming script? Listen,

I'll point you in the right direction 'Helping' you by doing so.

if(HouseInfo[x][hOwned] == 0)
{
new string[128];
format(string, sizeof(string), "%d is available to use.", x);
SendClientMessageEx(playerid, COLOR_WHITE, string);
break;
}
}
}


if(HouseInfo[x][hOwned] == 0) - Go look through the house variables.