Warning on Server Start-up
#1

When I start my server up, I always get this in the server_log.txt

AllowAdminTeleport() : function is deprecated. Please see OnPlayerClickMap()

In my GM I do have this:
pawn Код:
AllowAdminTeleport(0);
Anyone know what I should do to remove this warning. I don't have any problems (that I notice regarding this)...

***PLEASE DONT SAY IGNORE IT!!!***

Thanks in advance!
Reply
#2

try to use this: https://sampforum.blast.hk/showthread.php?tid=292813 fixes.inc by ******

OR

just simply remove
pawn Код:
AllowAdminTeleport(0);
and use the default callback from samp called OnPlayerClickMap

Quoted from king_hual
Quote:
Originally Posted by Wikipedia
In the process of authoring computer software, its standards or documentation, or other technical standards, deprecation is a status applied to features, characteristics, or practices to indicate that they should be avoided,
typically because they have been superseded.
Quote:
Originally Posted by king_hual
Посмотреть сообщение
Clear enough?
Reply
#3

It's telling you that the function AllowAdminTeleport() is no longer supported and shouldn't be used. No errors/warnings should ever be completely ignored; especially since this function (in my experience) will allow any player to use this function, even if they aren't an RCON admin.

You should remove that function from your script and add this one, it works completely fine IMHO. You'll need to do some edits, though!

pawn Код:
public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
{
    if(pStats[playerid][pAdmin] > 0 && adminOnDuty[playerid])
    {
        if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
        {
            new
                iVehID = GetPlayerVehicleID(playerid),
                iSeatID[MAX_PLAYERS] = -1
            ;
           
            foreach(new i : Player)
                if(IsPlayerInAnyVehicle(i) && GetPlayerVehicleID(i) == iVehID) iSeatID[i] = GetPlayerVehicleSeat(i);
           
            iSeatID[playerid] = 0;
            SetVehiclePos(iVehID, fX, fY, fZ);         
            foreach(new i : Player) if(iSeatID[i] != -1) PutPlayerInVehicle(playerid, iVehID, iSeatID[i]);
        }
        else SetPlayerPos(playerid, fX, fY, fZ);
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)