How to change a callback?
#1

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?
Reply
#2

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.
Reply
#3

Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)