Como poner un comando para Admin
#1

Hola como puedo poner un comando para admin? uso ladim este es el comando


if(strcmp(cmd, "/gate2", true) == 0)
{
if(gTeam[playerid] == TEAM_ARMY || gTeam[playerid] == TEAM_ADMIN)
{
if(PlayerToPoint(25.0, playerid,2720.827,-2514.226,13.46094))
{
if(ArmyGate2Status == 0)
{
MoveObject(igate3,2720.827,-2514.226,13.46094,3.0);
GameTextForPlayer(playerid,"~w~Gate Opening, please wait...",4000,3);
ArmyGate2Status = 1;
}
else
{
MoveObject(igate3,2720.827,-2504.226,13.46094,2.5);
GameTextForPlayer(playerid,"~w~Gate Closing, please wait...",4000,3);
ArmyGate2Status = 0;
}
}
else SendClientMessage(playerid,COLOR_RED,"You need to be near the gate to move it");
} else SendClientMessage(playerid,COLOR_RED,"Your gang doesnt have two gates");
return 1;
}
Reply
#2

Qual es la variable que usas para admin?
asi?
pawn Код:
if(PlayerInfo[playerid][pAdmin] == X)
Reply
#3

if(PlayerInfo[playerid][Level] >= 3) {
Reply
#4

Quote:
Originally Posted by Manuel7284
Посмотреть сообщение
if(PlayerInfo[playerid][Level] >= 3) {
pone esto en el comando (:
Reply
#5

Que crees que ise :S

if(gTeam[playerid] == TEAM_ARMY || if(PlayerInfo[playerid][Level] >= 3) {

Me salen varios errores
Reply
#6

pawn Код:
if(strcmp(cmd, "/gate2", true) == 0)
{
    if(PlayerInfo[playerid][Level] >= 1)
    {
        if(PlayerToPoint(25.0, playerid,2720.827,-2514.226,13.46094))
        {
            if(ArmyGate2Status == 0)
            {
                MoveObject(igate3,2720.827,-2514.226,13.46094,3.0);
                GameTextForPlayer(playerid,"~w~Gate Opening, please wait...",4000,3);
                ArmyGate2Status = 1;
            }
            else
            {
                MoveObject(igate3,2720.827,-2504.226,13.46094,2.5);
                GameTextForPlayer(playerid,"~w~Gate Closing, please wait...",4000,3);
                ArmyGate2Status = 0;
            }
        }
        else
        {
            SendClientMessage(playerid,COLOR_RED,"You need to be near the gate to move it");
        }
    }
    else
    {
        SendClientMessage(playerid,COLOR_RED,"Your not an admin.");
    }
    return 1;
}
Reply
#7

si pero entonces yo tambiйn quiero darle el comando alos del TEAM_ARMY

if(gTeam[playerid] == TEAM_ARMY

Como ago?
Reply
#8

Quote:
Originally Posted by Manuel7284
Посмотреть сообщение
Que crees que ise :S

if(gTeam[playerid] == TEAM_ARMY || if(PlayerInfo[playerid][Level] >= 3) {

Me salen varios errores
Pero en if(PlayerInfo... no tenes que poner nuevamente if ya que estas chequeando con gTeam, osea pone asн:

pawn Код:
if(gTeam[playerid] == TEAM_ARMY || PlayerInfo[playerid][Level] >= 3) {
Aclaro, debe ser del team army y/o adm lvl 3.
Reply
#9

Lo puse pero salen errores :S
Reply
#10

Quote:
Originally Posted by Manuel7284
Посмотреть сообщение
Lo puse pero salen errores :S
A mн no :S
Que errores? Y pasa las lнneas.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)