SA-MP Forums Archive
Need help with error! - 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: Need help with error! (/showthread.php?tid=508665)



Need help with error! - GnikLlort - 23.04.2014

I start the server and I get this on the Console
"AllowAdminTeleport() : function is deprecated. Please see OnPlayerClickMap()"

The server runs fine but It bugs me when I see this so I go into the gamemode file can change AllowAdminTeleport() to OnPlayerClickMap() but when I compile I get an error

"gamemodes\Gamemode6.pwn(1495) : error 004: function "OnPlayerClickMap" is not implemented"

What went wrong and how do I go about fixing it.


Re: Need help with error! - Konstantinos - 23.04.2014

OnPlayerClickMap is a callback. Remove the function and add this to the gamemode:
pawn Код:
public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
{
    SetPlayerPosFindZ(playerid, fX, fY, fZ);
    return 1;
}
For better results about the Z (height) parameter, you can use MapAndreas.


Re: Need help with error! - GnikLlort - 23.04.2014

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
OnPlayerClickMap is a callback. Remove the function and add this to the gamemode:
pawn Код:
public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
{
    SetPlayerPosFindZ(playerid, fX, fY, fZ);
    return 1;
}
For better results about the Z (height) parameter, you can use MapAndreas.
Thanks man!