Need Help With Admin Cmds
#1

How i make this command of admins only?

Код:
if(strcmp(cmd, "/adminjetpack", true) == 0)
	{
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X, Y, Z);
		CreatePickup(370, 3, X, Y, Z);
		SendClientMessage(playerid, COLOR_GREEN, "Jet Pack Created.");
		return 1;
	}
Reply
#2

pawn Код:
if(strcmp(cmd, "/adminjetpack", true) == 0)
{
if(IsPlayerAdmin(playerid))
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
CreatePickup(370, 3, X, Y, Z);
SendClientMessage(playerid, COLOR_GREEN, "Jet Pack Created.");
}
return 1;
}
Reply
#3

pawn Код:
if(strcmp(cmd, "/adminjetpack", true) == 0)
    {
        if(!IsPlayerAdmin(playerid)) return 0;
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X, Y, Z);
        CreatePickup(370, 3, X, Y, Z);
        SendClientMessage(playerid, COLOR_GREEN, "Jet Pack Created.");
        return 1;
    }
@ Naruto:
If the player is admin return the message?
Check the signs! (:
Reply
#4

FireCat Thats Working But Only Rcon Admin Can get /AdminJetpack not anyadmin can get it can u do it for 3 level admin
Reply
#5

give us the pInfo your using.
Reply
#6

How are you defining player's admin level?
Reply
#7

// Wrong thread.
Reply
#8

Quote:
Originally Posted by Kingunit
Посмотреть сообщение
pawn Код:
CMD:goto(playerid, params[])
{
    if(PlayerInfo[playerid][Adminlevel] < 1) return SendClientMessage(playerid, 0xFFFFFFFF,".:: You are not authorized to use this command ::."); // Own Vars
    new targetid, string[128];
    if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, 0xFFFFFFFF, "[PlayerID/PartOfName]");
    if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, 0xFFFFFFFF, " Player not connected!");
    else
    {
        new pName[24];
        GetPlayerName(targetid,pName,128);
        format(string, sizeof(string), "[ADMIN] You succesfully teleported to [%d] %s.",targetid, pName);
        SendClientMessage(playerid, 0xFFFFFFFF,string);
        SetPlayerInterior(playerid,GetPlayerInterior(targetid));
        new Float:TPX, Float:TPY, Float:TPZ;
        GetPlayerPos(targetid, TPX, TPY, TPZ);
        SetPlayerPos(playerid, TPX, TPY, TPZ+1);
    }
    return 1;
}
Read the topic again please.
Reply
#9

Quote:
Originally Posted by Naruto_Emilio
Посмотреть сообщение
Read the topic again please.
Yes? What's the problem.

// Sorry, posted the command in the wrong thread.
Reply
#10

Quote:
Originally Posted by Kingunit
Посмотреть сообщение
Yes? What's the problem.

// Sorry, posted the command in the wrong thread.
Jetpack not goto.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)