SA-MP Forums Archive
Need help with /goto command - 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: Need help with /goto command (/showthread.php?tid=319358)



Need help with /goto command - Jermi - 18.02.2012

Hello i need help how to make /goto command to players in my DM server and i need to set it for admins only but the problem is i don't have the admin system yet please help...:P


Re: Need help with /goto command - Rob_Maate - 18.02.2012

1. Hi Jermi
2. For RCON Admins. When you script an admin system, replace IsPlayerAdmin with your administrative check.
pawn Код:
CMD:goto(playerid, params[])
{
    new targetid;
    if(IsPlayerAdmin(playerid))
    {
        if(sscanf(params, "u", targetid) == 0)
        {
            new CurrInt = GetPlayerInterior(targetid);
            if(targetid == INVALID_PLAYER_ID)
            {
                SendClientMessage(playerid, 0xFFFFFFFF, "Error - Player specified is not connected.");
                return 1;
            }
            new Float:X, Float:Y, Float:Z;
            GetPlayerPos(targetid, X, Y, Z);
            SetPlayerInterior(playerid, CurrInt);
            if(GetPlayerState(playerid) == 2)
            {
                new CurrentVehicle = GetPlayerVehicleID(playerid);
                SetVehiclePos(CurrentVehicle, X, Y + 4, Z);
            }
            else
            {
                SetPlayerPos(playerid, X, Y + 1, Z);
            }
        }
        else
        {
            SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /Goto {FFFF00}[PlayerID/PartOfName]");
        }
    }
    return 1;
}



Re: Need help with /goto command - ReneG - 18.02.2012

Was this so hard man?


Re: Need help with /goto command - Jermi - 18.02.2012

@Rob Thanks but is this Tut. if i downloaded the Admin System?...
@VincentDunn what is that? lol :P


Re: Need help with /goto command - Rob_Maate - 18.02.2012

If you download an admin system, replace IsPlayerAdmin with the admin variable.
On most it's

if(PlayerInfo[playerid][pAdmin] >= 1)


Also - I didn't mention that the above code requires ZCMD and SSCANF. ****** them and download both includes.
sscanf also requires a plugin.


Re: Need help with /goto command - Lordzy - 26.03.2012

Can u make like this:

Код:
/ptele
/pgoto


Код:
/ptele >> Enables The pgoto command
/pgoto >> teleports to a player if the other player has enabled /ptele.
Код:
I saw this in a server


This might reduce the teleport hacks.


Re: Need help with /goto command - diehard5225 - 15.04.2012

yo bro come up with ur own ideas my servers have these ptele cmds kthxsbai


Re: Need help with /goto command - [LB]BlAcK_DeViL - 26.08.2012

Lordz So u Need That Command Pgoto Like That Server YoUnG Generation ....... :P