23.03.2014, 10:46
Not add that at the cmd? /G ? Cause i got this:
Код:
CMD:g(playerid, params[]) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, "You're not logged in."); return 1; } if(PlayerInfo[playerid][pGCMuted] > 0) { SendClientMessage(playerid, COLOR_GREY, "You're muted from this channel."); return 1; } new string[128]; if(GlobalChatTimer[playerid] > 0) { format(string, sizeof(string), "You must wait %d seconds before speaking again in this channel.", GlobalChatTimer[playerid]); SendClientMessage(playerid, COLOR_GREY, string); return 1; } if(GlobalChat[playerid] == 0) { SendClientMessage(playerid, COLOR_WHITE, "You're not in the global chat, type /toggc."); return 1; } if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: (/g) [text]"); if(strlen(params) > 80) return SendClientMessage(playerid, COLOR_GREY, "Your message is too long - the limit is 80 characters."); if(PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pDonator] == 1) { format(string, sizeof(string), "(( Ruby Donator %s: %s ))", GetPlayerNameEx(playerid), params); GlobalChatTimer[playerid] = 5; } else if(PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pDonator] == 2) { format(string, sizeof(string), "(( Sapphire Donator %s: %s ))", GetPlayerNameEx(playerid), params); GlobalChatTimer[playerid] = 5; } else if(PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pDonator] == 3) { format(string, sizeof(string), "(( Diamond Donator %s: %s ))", GetPlayerNameEx(playerid), params); GlobalChatTimer[playerid] = 5; } else if(PlayerInfo[playerid][pHelper] == 1) { format(string, sizeof(string), "(( Junior Helper %s: %s ))", GetPlayerNameEx(playerid), params); GlobalChatTimer[playerid] = 2; } else if(PlayerInfo[playerid][pHelper] == 2) { format(string, sizeof(string), "(( Senior Helper %s: %s ))", GetPlayerNameEx(playerid), params); GlobalChatTimer[playerid] = 2; } else if(PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pDonator] == 1) { format(string, sizeof(string), "(( Level %d Player %s: %s ))", PlayerInfo[playerid][pLevel], GetPlayerNameEx(playerid), params); GlobalChatTimer[playerid] = 5; } else if(PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pDonator] == 0) { format(string, sizeof(string), "(( Level %d Player %s: %s ))", PlayerInfo[playerid][pLevel], GetPlayerNameEx(playerid), params); GlobalChatTimer[playerid] = 5; } else if(PlayerInfo[playerid][pAdmin] >= 1) { format(string, sizeof(string), "(( Level %d Admin %s: %s ))", PlayerInfo[playerid][pAdmin], GetPlayerNameEx(playerid), params); } foreach(Player, i) { if(GlobalChat[i] == 1) { SendClientMessage(i, COLOR_NEWS, string); } } return 1; }