[ZCMD]Only For Admin HELP!!!!
#1

pawn Код:
CMD:fly(playerid)
{
        StartFly(playerid);
        SendClientMessage(playerid, red, "VIPs CMD: You Have Started Vips Fly Mode");
        return 1;
}

CMD:stopfly(playerid)
{
        StopFly(playerid);
        SendClientMessage(playerid, red, "VIPs CMD: You Have Stopped Vips Fly Mode");
        return 1;
}

can anyone help my make this only for Rcon Administrator ?

Help Thanks REP REP REP
Reply
#2

pawn Код:
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You are not an RCON admin!");
Reply
#3

are you sure it will work becuz i dont want to make my gamemode broken
Reply
#4

Add it like this:

pawn Код:
CMD:fly(playerid)
{
        if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You are not an RCON admin!");
        StartFly(playerid);
        SendClientMessage(playerid, red, "VIPs CMD: You Have Started Vips Fly Mode");
        return 1;
}

CMD:stopfly(playerid)
{
        if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You are not an RCON admin!");
        StopFly(playerid);
        SendClientMessage(playerid, red, "VIPs CMD: You Have Stopped Vips Fly Mode");
        return 1;
}
If it doesnt work, just take it out of the command, and its back to normal.
Reply
#5

pawn Код:
CMD:fly(playerid)
{
        if(!IsPlayerAdmin(playerid)) return 1;
        StartFly(playerid);
        SendClientMessage(playerid, red, "VIPs CMD: You Have Started Vips Fly Mode");
        return 1;
}

CMD:stopfly(playerid)
{
        if(!IsPlayerAdmin(playerid)) return 1;
        StopFly(playerid);
        SendClientMessage(playerid, red, "VIPs CMD: You Have Stopped Vips Fly Mode");
        return 1;
}
Reply
#6

Try This:
pawn Код:
CMD:fly(playerid)
{
        if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You must be an RCON Admin to use this Command.");
        StartFly(playerid);
        SendClientMessage(playerid, red, "VIPs CMD: You Have Started Vips Fly Mode");
        return 1;
}

CMD:stopfly(playerid)
{
        if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You must be an RCON Admin to use this Command.");
        StopFly(playerid);
        SendClientMessage(playerid, red, "VIPs CMD: You Have Stopped Vips Fly Mode");
        return 1;
}
Reply
#7

thanks (SAMProductions) You Make IT Works
Reply
#8

if(PlayerInfo[playerid][dRank] >= 3) {
can you help replace this in ? i hate to do but false ||||||||
Reply
#9

Try This:

pawn Код:
CMD:fly(playerid)
{
       if(PlayerInfo[playerid][dRank] >= 3) return SendClientMessage(playerid, -1, "You must be Rank 3 to use this Command.");
        StartFly(playerid);
        SendClientMessage(playerid, red, "VIPs CMD: You Have Started Vips Fly Mode");
        return 1;
}

CMD:stopfly(playerid)
{
        if(PlayerInfo[playerid][dRank] >= 3) return SendClientMessage(playerid, -1, "You must be Rank 3 to use this Command.");
        StopFly(playerid);
        SendClientMessage(playerid, red, "VIPs CMD: You Have Stopped Vips Fly Mode");
        return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)