ZCMD: Unkown Command
#9

Quote:

stock IsPlayerNearHouse(playerid)
{
for(new i = 0; i <= sizeof(hInfo); i++)
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, hInfo[i][hPos][0], hInfo[i][hPos][1], hInfo[i][hPos][2]))
{
if(strcmp(GetNameEx(playerid), hInfo[i][hOwner], true) == 0)
{
printf("%i", i);
return i;
}
}
else if(!IsPlayerInRangeOfPoint(playerid, 5.0, hInfo[i][hPos][0], hInfo[i][hPos][1], hInfo[i][hPos][2]))
{
SendClientMessage(playerid, COLOR_GREY, "You are not in range of a house you own.");
}
}
return 0;
}

If I did this, it would say "You are not inrange" every time it loops that I am not in range. So if I was at houseid 297 when i used the command, it would say "You are not in range" 296 times until it said "locked"
Reply


Messages In This Thread
ZCMD: Unkown Command - by Blademaster680 - 08.01.2015, 20:39
Re: ZCMD: Unkown Command - by DavidSparks - 08.01.2015, 20:45
Re: ZCMD: Unkown Command - by Blademaster680 - 08.01.2015, 20:48
Re: ZCMD: Unkown Command - by Sawalha - 08.01.2015, 20:48
Re: ZCMD: Unkown Command - by Blademaster680 - 08.01.2015, 20:51
Re: ZCMD: Unkown Command - by Jefff - 08.01.2015, 20:53
Re: ZCMD: Unkown Command - by Blademaster680 - 08.01.2015, 20:54
Re: ZCMD: Unkown Command - by ahmedkoki - 08.01.2015, 20:57
Re: ZCMD: Unkown Command - by Blademaster680 - 08.01.2015, 21:00
Re: ZCMD: Unkown Command - by Jefff - 08.01.2015, 21:08

Forum Jump:


Users browsing this thread: 2 Guest(s)