22.07.2015, 19:17
I don't understand this part, can you explain it to me ?
does it mean if id = house_inside and doesn't equal -1 ? or it equals id to house_inside then check ?
also since you didn't post the rest of "GetPos", Let's try two things
and
does it mean if id = house_inside and doesn't equal -1 ? or it equals id to house_inside then check ?
also since you didn't post the rest of "GetPos", Let's try two things
pawn Код:
stock GetPlayerLocation(playerid)
{
new
Float:fX,
Float:fY,
Float:fZ,
string[32],
id = -1;
if ((id = House_Inside(playerid)) != -1)
{
fX = HouseData[id][housePos][0];
fY = HouseData[id][housePos][1];
fZ = HouseData[id][housePos][2];
}
else if ((id = Business_Inside(playerid)) != -1)
{
fX = BusinessData[id][bizPos][0];
fY = BusinessData[id][bizPos][1];
fZ = BusinessData[id][bizPos][2];
}
else if ((id = Entrance_Inside(playerid)) != -1)
{
fX = EntranceData[id][entrancePos][0];
fY = EntranceData[id][entrancePos][1];
fZ = EntranceData[id][entrancePos][2];
}
else GetPlayerPos(playerid, fX, fY, fZ);
format(string, 32, GetLocation(fX, fY, fZ));
SendClientMessage(playerid, -1, string");//Just to make sure it's correct
return string;
}
pawn Код:
format(str, sizeof(str), "%s", random(10), '%');//Just to make sure the textdraw updates with no problems
PlayerTextDrawSetString(1, PlayerData[i][pTextdraws][85], str);


