Warning on Server Start-up - 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: Warning on Server Start-up (
/showthread.php?tid=422487)
Warning on Server Start-up -
jakejohnsonusa - 13.03.2013
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:
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!
Re: Warning on Server Start-up - Patrick - 13.03.2013
try to use this:
https://sampforum.blast.hk/showthread.php?tid=292813 fixes.inc by
******
OR
just simply remove
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?
|
|
Re: Warning on Server Start-up -
Scenario - 13.03.2013
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;
}