AllowAdminTeleport()
#1

Before i start, i am back from a long time scripting, i found my script and im scripting agian,

I encountered a problem when i open SAMP-server, My script has no errors or Warnings

It says

pawn Код:
[15:28:37] AllowAdminTeleport() : function is deprecated. Please see OnPlayerClickMap()
[15:28:37] Loading 176 pickups... Loaded successfuly !
[15:28:37]  
[15:28:37]  
[15:28:37]  
[15:28:37]  
[15:28:37]  
[15:28:37]  
[15:28:37]  
[15:28:37]  
[15:28:37]  
[15:28:37]  
[15:28:37]     ----------------
[15:28:37]    | Crystal Roleplay  |
[15:28:37]    |      By:  Danny
[15:28:37]     ----------------
[15:28:37]  
[15:28:37]  
[15:28:37] Number of vehicle models: 40
Reply
#2

Its removed in 0.3d
You can use the OnPlayerClickMap() callback for replace this function

Код:
public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ) 
{
    if(IsPlayerAdmin(playerid)) 
    {
        SetPlayerPosFindZ(playerid, fX, fY, fZ);
        return 1;
    }
    return 1;
}
Reply
#3

Remove AllowAdminTeleport and use this.
pawn Код:
public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
{
    if(IsPlayerAdmin(playerid))
    SetPlayerPosFindZ(playerid, fX, fY, fZ);
    return 1;
}
Reply
#4

Its not in use anymore. You must use OnPlayerClickMap callback for that now. Use it like this:
pawn Код:
public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
{
    if(IsPlayerAdmin(playerid))
    {
        if(GetPlayerState(playerid) == 2)
        {
            new carid;
            carid=GetPlayerVehicleID(playerid);
            SetVehiclePos(carid,fX,fY,MapAndreas_FindZ_For2DCoord(fX,fY,fZ));
        }
        else SetPlayerPosFindZ(playerid, fX, fY, fZ);
    }
    return 1;
}
Edit: wowow, 2 replies while i was replying.. anyway, my way here is with MapAndreas plugin and both for vehicle and on foot tp.
Reply
#5

Delete lines containing AllowAdminTeleport()
Reply
#6

It worked, but my server doesnt turn on, it just does this
pawn Код:
SA-MP Dedicated Server
----------------------
v0.3d-R2, (C)2005-2011 SA-MP Team

[15:42:43] filterscripts = ""  (string)
[15:42:43]
[15:42:43] Server Plugins
[15:42:43] --------------
[15:42:43]  Loading plugin: streamer
[15:42:43]

*** Streamer Plugin v2.6 by Incognito loaded ***

[15:42:43]   Loaded.
[15:42:43]  Loaded 1 plugins.

[15:42:43]
[15:42:43] Filterscripts
[15:42:43] ---------------
[15:42:43]   Loaded 0 filterscripts.

[15:42:43] Loading 176 pickups... Loaded successfuly !
[15:42:43]  
[15:42:43]  
[15:42:43]  
[15:42:43]  
[15:42:43]  
[15:42:43]  
[15:42:43]  
[15:42:43]  
[15:42:43]  
[15:42:43]  
[15:42:43]     ----------------
[15:42:43]    | Crystal Roleplay  |
[15:42:43]    |      By:  Danny
[15:42:43]     ----------------
[15:42:43]  
[15:42:43]  
[15:42:43] Number of vehicle models: 40
[15:42:55] Loading 176 pickups... Loaded successfuly !
[15:42:55]  
[15:42:55]  
[15:42:55]  
[15:42:55]  
[15:42:55]  
[15:42:55]  
[15:42:55]  
[15:42:55]  
[15:42:55]  
[15:42:55]  
[15:42:55]     ----------------
[15:42:55]    | Crystal Roleplay  |
[15:42:55]    |      By:  Danny
[15:42:55]     ----------------
[15:42:55]  
[15:42:55]  
[15:42:55] Number of vehicle models: 40
[15:43:12] Loading 176 pickups... Loaded successfuly !
[15:43:12]
Reply
#7

post the server.cfg, please.
Reply
#8

pawn Код:
echo Executing Server Config...
lanmode 0
rcon_password adf
maxplayers 32
port 7777
hostname |Crystal-RP|
gamemode0 Crystal
filterscripts
announce 1
query 1
weburl [url]www.sa-mp.com[/url]
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
maxnpc 0
logtimeformat [%H:%M:%S]
plugins streamer
Reply
#9

omg, I'm not seeing any error.

Must be some problem in your script
Reply
#10

Whats the name of your .pwn file? if its Crystal then copy this and paste it to server.cfg
pawn Код:
echo Executing Server Config...
lanmode 0
rcon_password adf
maxplayers 32
port 7777
hostname |Crystal-RP|
gamemode0 Crystal 1
filterscripts
announce 1
query 1
weburl [url]www.sa-mp.com[/url]
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
maxnpc 0
logtimeformat [%H:%M:%S]
plugins streamer
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)