06.05.2018, 00:01
PHP Code:
GetPlayerClosestHouse(playerid, Float:range = 3.0)
{
new id = -1;
for (new i = 0; i < MAX_CASA; i ++)
{
if (IsPlayerInRangeOfPoint(playerid, range, Casa[i][PosX], Casa[i][PosY], Casa[i][PosZ]))
{
id = i;
break;
}
}
return id;
}
CMD:teste(playerid)
{
new id = GetPlayerClosestHouse(playerid);
if (id == -1)
return print("| ERRO | Vocк Nгo Estб Em Uma Casa");
print("Debug");
return 1;
}