command(v, playerid, params[]) { new message[128], string[128]; if(sscanf(params, "z", message)) { SendClientMessage(playerid, WHITE, "SYNTAX: /(v)ip [message]"); } else { if(Player[playerid][VipRank] >= 1) { if(strlen(message) < 1) { SendClientMessage(playerid, WHITE, "SYNTAX: /(v)ip [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(IsPlayerConnectedEx(i) && Player[i][VipRank] >= 1 && Player[i][ToggedVIP] == 0) { SendClientMessage(i, 0xF2C200FF, string); } } } } } return 1; }
if(Player[playerid][AdminLevel] >= 1)
CMD:n(player, params[]) //You can replace n with anything you want, newbiechat etc.
{
new message[80];
if(sscanf(params, "s", message)) return SendClientMessage(playerid, WHITE, "SYNTAX: /(n) [message]");
if(strlen(message) > 80) return SendClientMessage(playerid, WHITE, "SYNTAX: /(n) [message]");
if(Player[playerid][AdminLevel] < 1)
{
format(string,sizeof(string),"[NEWBIE] %s says: %s",GetName(playerid), message);
}
else
{
format(string,sizeof(string),"[NEWBIE] {FF0000}%s {F2C200}says: %s",GetName(playerid),message);
}
SendClientMessageToAll(0xF2C200FF, string); //You can replace the colour with whatever you desire.
return 1;
}
command(v, playerid, params[])
{
if(!Player[playerid][VipRank]) return 0; //or 1, a message, whatever you want
if(!isnull(params))
{
new string[128], color[9];
if(Player[playerid][AdminLevel]) format(color, sizeof(color), "{CC0000}");
else format(color, sizeof(color), "{}");
format(string, sizeof(string), "[VIP] %s%s{999999} says (%d): %s", color, GetName(playerid), Player[playerid][VipRank], params);
for(new i=0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i) && Player[i][VipRank] && !Player[i][ToggedVIP])
SendClientMessage(i, 0xF2C200FF, string);
}
else return SendClientMessage(playerid, WHITE, "SYNTAX: /(v)ip [message]");
return 1;
}
yeah just change it to the 999999 (inside the brackets in the else statement) or whatever you want
|
else format(color, sizeof(color), "{}");
else format(color, sizeof(color), "{999999}");
Oh lol I thought you were asking for a newbie chat command :S oops.
but no, that isn't the best way :S You can just reformat the string if they aren't admins... just like in the 'n' command, just replace the variables with admin variables. |
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;
}