SA-MP Forums Archive
AllowAdminTeleport() - 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: AllowAdminTeleport() (/showthread.php?tid=327058)



AllowAdminTeleport() - dannyk0ed - 19.03.2012

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



Re: AllowAdminTeleport() - NeTuddMeg - 19.03.2012

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;
}



Re: AllowAdminTeleport() - T0pAz - 19.03.2012

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;
}



Re: AllowAdminTeleport() - Richie© - 19.03.2012

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.


Re: AllowAdminTeleport() - Abravanel - 19.03.2012

Delete lines containing AllowAdminTeleport()


Re: AllowAdminTeleport() - dannyk0ed - 19.03.2012

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]



Re: AllowAdminTeleport() - Abravanel - 19.03.2012

post the server.cfg, please.


Re: AllowAdminTeleport() - dannyk0ed - 19.03.2012

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



Re: AllowAdminTeleport() - Abravanel - 19.03.2012

omg, I'm not seeing any error.

Must be some problem in your script


Re: AllowAdminTeleport() - new121 - 19.03.2012

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