12.10.2014, 10:51
Try This:
Also, I Suggest To You To Use zcmd, it's much easier in creating commands.
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.