Command problem
#8

Try This:
pawn Код:
if(strcmp(cmd, "/vipchat", true) == 0 || strcmp(cmd, "/vc", true) == 0 || strcmp(cmd, "/vchat", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_WHITE, "You havent logged in yet");
        if (PlayerInfo[playerid][pVIP]==0 && PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_WHITE, "You are not a VIP member");
        if(PlayerInfo[playerid][pMuted] == 1) return SendClientMessage(playerid, TEAM_CYAN_COLOR, "You can't speak, you have been silenced");
        if(sscanf(params, "uds[50]", cmdtext)) return SendClientMessage(playerid, 0xFFFFFFFF, "Correct usage: /(v)ip©hat [text]");
        new result[64];
        GetPlayerName(playerid, sendername, sizeof(sendername));
        format(string, sizeof(string), "{FFFFFF}» {F3FF02}[VIP CHAT] %s: {FFFFFF}%s", sendername, result);
        for(new i=0; i<=MAX_PLAYERS; i++) {
        if(PlayerInfo[i][pVIP]==1)
        SendClientMessage(i, -1, string);
    }
    }
    return 1;
}

Also, I Suggest To You To Use zcmd, it's much easier in creating commands.
Reply


Messages In This Thread
Command problem - by rraulinio - 12.10.2014, 10:37
Re: Command problem - by Stinged - 12.10.2014, 10:38
Re: Command problem - by rraulinio - 12.10.2014, 10:40
Re: Command problem - by XGreen - 12.10.2014, 10:42
Re: Command problem - by MrJunkiTM - 12.10.2014, 10:43
Re: Command problem - by rraulinio - 12.10.2014, 10:46
Re: Command problem - by Stinged - 12.10.2014, 10:51
Re: Command problem - by XGreen - 12.10.2014, 10:51
Re: Command problem - by rraulinio - 12.10.2014, 10:52
Re: Command problem - by dominik523 - 12.10.2014, 13:27

Forum Jump:


Users browsing this thread: 2 Guest(s)