Onplayerclickmap not working Help REP+ - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Onplayerclickmap not working Help REP+ (
/showthread.php?tid=579609)
Onplayerclickmap not working Help REP+ -
HydraHumza - 28.06.2015
Hello this is the code i am using for map teleport it was working eariler but dont know why its not working ??
Код:
public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
{
if(PlayerInfo[playerid][Level] >= 1 || PlayerInfo[playerid][OnDuty] == 1)
{
if(IsPlayerInAnyVehicle(playerid))
{
new vid;
vid = GetPlayerVehicleID(playerid);
SetVehiclePos(vid, fX, fY, fZ);
SetPlayerPosFindZ(playerid, fX, fY, fZ);
PutPlayerInVehicle(playerid, vid, 0);
}
else
{
SetPlayerPosFindZ(playerid, fX, fY, fZ);
}
}
return 1;
}
Respuesta: Onplayerclickmap not working Help REP+ -
[DOG]irinel1996 - 28.06.2015
I don't see any code error there, are you sure that
pLevel and
OnDuty have the right value?
PD: try sending a message to the player to see what happens.
Re: Onplayerclickmap not working Help REP+ -
shadowdog - 28.06.2015
From:
https://sampwiki.blast.hk/wiki/SetPlayerPosFindZ
This function does not work if the new coordinates are far away from where the player currently is. The Z height will be 0, which will likely put them underground. It is highly recommended that the MapAndreas plugin be used instead.
Your pos is probably too far away for the function to handle, and will therefore not work.
Re: Respuesta: Onplayerclickmap not working Help REP+ -
HydraHumza - 28.06.2015
Quote:
Originally Posted by [DOG]irinel1996
I don't see any code error there, are you sure that pLevel and OnDuty have the right value?
PD: try sending a message to the player to see what happens.
|
I check everything

didn't work it was working before but now i was testing my gm it was not working :/
Respuesta: Onplayerclickmap not working Help REP+ -
[DOG]irinel1996 - 28.06.2015
Give a try in a clean gamemode like
lvdm.
Re : Onplayerclickmap not working Help REP+ -
Terrorizt - 28.06.2015
SetPlayerPosFindZ does not work if the new coordinates are far away. Try to teleport to somewhere close to your position.