How to change a callback? - 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: How to change a callback? (
/showthread.php?tid=350244)
How to change a callback? -
Makaveli93 - 11.06.2012
I wish to use the following callback
pawn Код:
public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
{
if(PlayerInfo[playerid][pAdmin] > 1 || IsPlayerAdmin(playerid))
{
SetPlayerPosFindZ(playerid, mX, mY, 100);
}
return 1;
}
But I get an error that fX, fY and fZ are being shadowed by a global variable. I have fX, fY and fZ variables in my faction enumerations and changing them all would take a lot of time. Is there a way to change the callback to use differently named variables?
Re: How to change a callback? -
JaTochNietDan - 11.06.2012
Simply change the names of them in the callback you posted and then venture into the a_samp.inc file, find
pawn Код:
forward OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ);
and change the names of them there too.
Should work fine.
Re: How to change a callback? -
Makaveli93 - 11.06.2012
Thanks