27.01.2015, 06:31
Ola, como posso fazer este comando (abaixo) assim: o jogador usa /newb [Pergunta] e o moderador /newb [ID] [Resposta]
Код:
CMD:newb(playerid, params[]) { new log[128]; if(gPlayerLogged{playerid} == 0) { SendClientMessageEx(playerid, COLOR_GREY, "You're not logged in."); return 1; } if(PlayerInfo[playerid][pTut] == 0) { SendClientMessageEx(playerid, COLOR_GREY, "You can't do that at this time."); return 1; } if ((nonewbie) && PlayerInfo[playerid][pAdmin] < 2) { SendClientMessageEx(playerid, COLOR_GRAD2, "The newbie chat channel has been disabled by an administrator!"); return 1; } if(PlayerInfo[playerid][pNMute] == 1) { SendClientMessageEx(playerid, COLOR_GREY, "You are muted from the newbie chat channel."); return 1; } new string[128]; if(NewbieTimer[playerid] > 0) { format(string, sizeof(string), "You must wait %d seconds before speaking again in this channel.", NewbieTimer[playerid]); SendClientMessageEx(playerid, COLOR_GREY, string); return 1; } if(gNewbie[playerid]==1) { SendClientMessageEx(playerid, COLOR_GREY, "You have the channel toggled, /tognewbie to re-enable!"); return 1; } if(isnull(params)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: (/newb)ie [text]"); if(PlayerInfo[playerid][pHelper]<1&&PlayerInfo[playerid][pAdmin] < 1) { NewbieTimer[playerid] = 50; } if(PlayerInfo[playerid][pHelper]<1&&PlayerInfo[playerid][pAdmin]<1) { format(string, sizeof(string), "** Newbie %s [%d]: %s", GetPlayerNameEx(playerid), playerid, params); } if(PlayerInfo[playerid][pHelper] == 1&& PlayerInfo[playerid][pAdmin]<2) { format(string, sizeof(string), "** Junior Moderator %s [%d]: %s", GetPlayerNameEx(playerid), playerid, params); } if(PlayerInfo[playerid][pAdmin] == 1) { format(string, sizeof(string), "** Server Moderator %s [%d]: %s", GetPlayerNameEx(playerid), playerid, params); } if(PlayerInfo[playerid][pHelper] == 2&&PlayerInfo[playerid][pAdmin]<2) { format(string, sizeof(string), "** Moderator %s [%d]: %s", GetPlayerNameEx(playerid), playerid, params); } if(PlayerInfo[playerid][pHelper] == 3&&PlayerInfo[playerid][pAdmin]<2) { format(string, sizeof(string), "** Senior Moderator %s: %s", GetPlayerNameEx(playerid), params); } if(PlayerInfo[playerid][pHelper] == 4&&PlayerInfo[playerid][pAdmin]<2) { format(string, sizeof(string), "** Chief Moderator %s: %s", GetPlayerNameEx(playerid), params); } if(PlayerInfo[playerid][pHelper] == 5&&PlayerInfo[playerid][pAdmin]<2) { format(string, sizeof(string), "** Head Chief Moderator %s: %s", GetPlayerNameEx(playerid), params); } if(PlayerInfo[playerid][pAdmin] >= 2) { format(string, sizeof(string), "** Admin %s: %s", GetPlayerNameEx(playerid), params); } if(PlayerInfo[playerid][pAdmin] < 2 && CheckServerAd(params)) { format(string,sizeof(string),"Warning: %s [ID: %d] may be server advertising: '%s'.", GetPlayerNameEx(playerid), playerid, params); ABroadCast(COLOR_RED, string, 2); format(log, sizeof(log), "Warning: %s [ID: %d] may be server advertising: '%s'.", GetPlayerNameEx(playerid), playerid, params); Log("logs/hack.log", string); return 0; } foreach(Player, n) { if (gNewbie[n]==0) { SendClientMessageEx(n, COLOR_NEWBIE, string); } } return 1; }