if player Type a Command
#1

Hey guys
Код:
if(text[0] == '/')
    {
        new str[128];
        new playername[MAX_PLAYER_NAME];
        GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
        format(str, sizeof(str), "{FFFFFF}[Commands]{00FF00} %s: %s", playername, text[1]);
        for(new i = 0; i < MAX_PLAYERS; i++)
            if(IsPlayerConnected(i) && AccountInfo[playerid][AdminLevel] >= 1)
                SendMessageToAdmins(COLOR_ORANGE, str);
        return 0;
    }
No error But does't Work IG
Reply
#2

pawn Код:
return 0;
change to

pawn Код:
return 1;
Reply
#3

pawn Код:
if(text[0] == '/')
{
     new str[128];
     new playername[MAX_PLAYER_NAME];
     GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
     format(str, sizeof(str), "{FFFFFF}[Commands]{00FF00} %s: %s", playername, text[1]);
     for(new i = 0; i < MAX_PLAYERS; i++)
     if(IsPlayerConnected(i) && AccountInfo[playerid][AdminLevel] >= 1)
     SendMessageToAdmins(COLOR_ORANGE, str);
     return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)