#1

How would i make it where when one of my admins types a cmd i can see it. Like LVL 5 Only
Reply
#2

You have to render it at the start of onplayercommandtext


pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new sendername[MAX_PLAYER_NAME], string[128];
    if(PlayerInfo[playerid][pAdmin] >= 5)
    {
        GetPlayerName(playerid, sendername, sizeof(sendername));
        format(string, sizeof(string), "[CMD]: %s Has Typed '%s'", sendername, cmdtext);
        SendClientMessage(playerid, 0x33CCFFAA, string);
    }
    // more code
}
Reply
#3

Ok, I get like 8 errors, i got it down to 4

Код:
(811)if(playerinfo[playerid][pAdmin] >=5);
(812){
(813)GetPlayerName(playerid, sendername, sizeof(sendername));
(814)format(string, sizeof(string), "***[CMD Used]: %s Has Used '%s'",sendername, cmdtext);
(815)SendClientMessage(playerid, 0x33CCFFAA, string);
Код:
(802) : warning 217: loose indentation
(811) : error 017: undefined symbol "playerinfo"
(811) : warning 215: expression has no effect
(811) : error 001: expected token: ";", but found "]"
(811) : error 029: invalid expression, assumed zero
(811) : fatal error 107: too many error messages on one line
Reply
#4

Код:
(811)if(playerinfo[playerid][pAdmin] >=5)
This will help,
oh and the "playerinfo" you have to define that, or change it into your accountinfo stuff.
so you got an admin level define right? change the "playerinfo" into that(note: its capital sensetive).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)