17.09.2012, 09:20
pawn Код:
CMD:v(playerid, params[])
{
new message[80];
if(Player[playerid][VipRank] < 1 && Player[playerid][AdminLevel] < 1) return SendClientMessage(playerid, WHITE, "Only VIP Members/Administrators Can Use This Command!");
if(sscanf(params, "s", message)) return SendClientMessage(playerid, WHITE, "SYNTAX: /(v)ip [message]");
if(strlen(message) > 80) return SendClientMessage(playerid, WHITE, "SYNTAX: /(v)ip [message]");
new string[150];
if(Player[playerid][AdminLevel] > 0)
{
format(string,sizeof(string),"[VIP] {FF0000}%s {F2C200}says (%d): %s",GetName(playerid),Player[playerid][VipRank],message);
}
else
{
format(string,sizeof(string),"[VIP] %s says (%d): %s",GetName(playerid),Player[playerid][VipRank],message);
}
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(Player[i][VipRank] > 0)
{
if(Player[i][ToggedVIP] == 0)
{
SendClientMessage(i, 0xF2C200FF, string);
}
}
}
}
return 1;
}