17.09.2012, 08:39
I'm sure this is something really simple, but I was wondering if I could have some help with the script below for the vip chat.
Now, I want to make it so for admin just their name is red, here is the defined admin thing I have for the newbie chat:
Although, I want it to be from levels 1 through to 6.
-Thanks in advance.
Код:
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)
-Thanks in advance.