12.07.2011, 04:10
I have a command to create a house pickup, and when i have the for loop in it the game displays "Server: Unknown command" however with the loop commented out it works. Anyone know whats wrong here? Even if you don't know just comment saying IDk, so i know if i should give up with the loop or not.
Код:
CMD:chouse(playerid)
{
new hID;
if(gPlayerData[playerid][ADMINLEVEL] < 1)return 1;
for (new i = 0; i <= MAX_HOUSES; i++)
{
if(gHouseData[i][EXIST] != 0)
{
hID++;
}
else
{
continue;
}
}
GetPlayerPos( playerid, gHouseData[hID][LOCX], gHouseData[hID][LOCY], gHouseData[hID][LOCZ]);
CreateDynamicPickup( 1237, 1, gHouseData[hID][LOCX], gHouseData[hID][LOCY], gHouseData[hID][LOCZ], -1, -1, -1);
gPlayerData[playerid][CHOUSEID] = hID;
gHouseData[hID][EXIST] = 1;
SendClientMessage(playerid, COLOR_WHITE, "WTH");
return 1;
}

