16.07.2013, 04:16
o Aviso de helpers estб para que o Helper nao floode no Aviso, entao fiz um settimer, mais ele nao funfa, o cara manda uma vez, e so da pra ele mandar denovo depois de GMX ! Olhem o Code ai:
Depois..
News e Forwards.
Nao й erro de compilaзгo nao !
Код:
if(strcmp(cmd, "/avisohelper", true) == 0 || strcmp(cmd, "/avh", true) == 0) { if(IsPlayerConnected(playerid)) { GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_GRAD2, "USE: (/[av]iso[h]elper) [mensagem]"); return 1; } if(PlayerInfo[playerid][pHelperTrabalhando] == 0) { return SendClientMessage(playerid,COLOR_GRAD2,"Vocк nгo estб em trabalho! Use: /th"); } if(PlayerInfo[playerid][pHelper] < 1) { return SendClientMessage(playerid,COLOR_GRAD1,"Vocк nгo tem autorizaзгo para usar este comando"); } if(anhelper[playerid] == 1) { return SendClientMessage(playerid,COLOR_GRAD1,"Vocк ainda nгo pode fazer um novo anuncio! Espere..."); } SendClientMessageToAll(COLOR_WHITE, "|______________ {FF7800}Aviso dos Helpers {FFFFFF}______________|"); if(PlayerInfo[playerid][pHelper] == 1) { format(string, sizeof(string), "Helper Iniciante %s: {F5FF00}%s", sendername, result); } else if(PlayerInfo[playerid][pHelper] == 2) { format(string, sizeof(string), "Helper Moderador+ %s: {F5FF00}%s", sendername, result); } else if(PlayerInfo[playerid][pHelper] == 3) { format(string, sizeof(string), "Helper Moderador++ %s: {F5FF00}%s", sendername, result); } else if(PlayerInfo[playerid][pHelper] == 4) { format(string, sizeof(string), "Helper Intermediбrio %s: {F5FF00}%s", sendername, result); } else if(PlayerInfo[playerid][pHelper] == 5) { format(string, sizeof(string), "Helper Master %s: {F5FF00}%s", sendername, result); } else if(PlayerInfo[playerid][pHelper] == 6) { format(string, sizeof(string), "Helper Lider %s: {F5FF00}%s", sendername, result); } SendClientMessageToAll(COLOR_HELPER, string); anhelper[playerid] = 1; SetTimer("TempoAnHelper",15000,false); } return 1; }
Код:
public TempoAnHelper(playerid) { anhelper[playerid] = 0; return 1; }
Код:
forward TempoAnHelper(playerid); new anhelper[MAX_PLAYERS];