23.03.2011, 00:59
Ops, my bad. I read it wrong, try this:
pawn Код:
CMD:vchat(playerid, params[])
{
if(PlayerData[playerid][vip] < 0) return SendClientMessage(playerid, 0xFF9900AA, "You cannot use this command!");
new
iName[MAX_PLAYER_NAME],
iStr[128];
if(isnull(params)) return SendClientMessage(playerid, 0xFF9900AA, "Usage: /VChat < Message >");
GetPlayerName(playerid, iName, sizeof(iName));
for(new i = 0; i < MAX_PLAYERS; ++i)
{
if(IsPlayerConnected(i) && !IsPlayerNPC(i))
{
if(PlayerData[i][vip] > 0)
{
format(iStr, sizeof(iStr), "[VIPCHAT] %s: %s", iName, params);
SendClientMessage(i, 0xFF9900AA, iStr);
}
}
}
return 1;
}