13.11.2015, 16:49
(
Последний раз редактировалось leo9; 14.11.2015 в 14:15.
)
This is how to fix the problem when the position is so far from player and the z coordinate is 0,without using any plugins.
I hope its usefull
Код:
new bool:ClickedOnMap[MAX_PLAYERS] = false;
public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
{
SetPlayerPos(playerid, fX, fY, 550);
GameTextForPlayer(playerid,"Teleporting",1000,4);
ClickedOnMap[playerid] = true;
return 1;
}
public OnPlayerUpdate(playerid)
{
if(ClickedOnMap[playerid] == true)
{
new Float:p[3];
GetPlayerPos(playerid,p[0],p[1],p[2]);
SetPlayerPosFindZ(playerid,p[0],p[1],p[2]);
KillTimer(TelTimer[playerid]);
TogglePlayerControllable(playerid, true);
ClickedOnMap[playerid] = false;
}
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
ClickedOnMap[playerid] = false;
}


