Need help with /goto command
#1

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
Reply
#2

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;
}
Reply
#3

Was this so hard man?
Reply
#4

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

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.
Reply
#6

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.
Reply
#7

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)