Dynamic Posted December 30, 2012 Report Share Posted December 30, 2012 dupa cum spune si titlul cand dau cuiva /w text zice ca ii este blocat whisperu, indiferent ca e admin/playeri sau orice care care vrea sa dea /w nu merge. va rog ajutatimawhisperuif(strcmp(cmd, "/whisper", true) == 0 || strcmp(cmd, "/w", true) == 0) { if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !"); return 1; } if(PlayerInfo[playerid][pLevel] < 4) { SendClientMessage(playerid, 0x4FA7FFFF, "*** You need level 4 to use this !"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_LIGHTRED, "USAGE: (/w)isper [playerid/PartOfName] [whisper text]"); return 1; } giveplayerid = ReturnUser(tmp); if (IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if(HidePM[giveplayerid] > 0) { SendClientMessage(playerid, COLOR_LIGHTGREEN, " That player is blocking Whispers !"); return 1; } GetPlayerName(playerid, sendername, sizeof(sendername)); GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); if(giveplayerid == playerid) { format(string, sizeof(string), "* %s mutters somthing.", sendername); ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); } 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, "USAGE: (/w)isper [playerid/PartOfName] [whisper text]"); return 1; } format(string, sizeof(string), "%s[ID:%d] whispers: %s", sendername, playerid, (result)); SendClientMessage(giveplayerid, 0x009191FF, string); format(string, sizeof(string), "Wisper sent to %s[ID:%d] : %s", giveplayer, giveplayerid ,(result)); SendClientMessage(playerid, 0x009191FF, string); SBizzInfo[2][sbTill] += txtcost / 2; ExtortionSBiz(2, txtcost / 2); return 1; } } else { format(string, sizeof(string), " That player is not connected.", giveplayerid); SendClientMessage(playerid, COLOR_GRAD1, string); } } return 1; } /togwhisper if(strcmp(cmd, "/togwhisper", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pDonateRank] > 0 || PlayerInfo[playerid][pAdmin] > 1) { if (!HidePM[playerid]) { HidePM[playerid] = 1; SendClientMessage(playerid, COLOR_GRAD2, " Whisper chat channel Disabled !"); } else if (HidePM[playerid]) { HidePM[playerid] = 0; SendClientMessage(playerid, COLOR_GRAD2, " Whisper chat channel Enabled !"); } } else { SendClientMessage(playerid, COLOR_GREY, " Not an Admin / Premium Account User !"); return 1; } } return 1; } <a href="http://www.game-state.com/94.177.106.162:7777/"><img src="http://www.game-state.com/94.177.106.162:7777/430x73_FFFFFF_FF9900_000000_000000.png" alt="www.Game-State.com" style="border-style: none;" /></a> Link to comment Share on other sites More sharing options...
BuBu Posted December 30, 2012 Report Share Posted December 30, 2012 Deci problema e in felul urmator daca spui ca atunci cand dai /w cuiva si deja zice ca are /w inchis adica (/togwhisper) iar el normal nu a da e posibil ca tu sa ai activata functia [glow=red,2,300]HidePM[/glow] la OnPlayerConnectCauta la OnPlayerConnect linia HidePM[playerid] = 1 sau 0;Daca ai 0 inseamna ca e dezactivata iar daca ai 1 inseamna ca e activata oricand intra pe server un player.P.S: Daca nici asa nu merge e tot ceva de la HidePM deoarece el blocheaza/deblocheaza whisper-ul e posibil sa fie si din alta parte asa ca cauta peste tot linia HidePM si vezi daca e cumva undeva setat [glow=red,2,300]=1[/glow] , inseamna ca e inchis whisper. Link to comment Share on other sites More sharing options...
Dynamic Posted December 30, 2012 Author Report Share Posted December 30, 2012 am rezolvat ms mult <a href="http://www.game-state.com/94.177.106.162:7777/"><img src="http://www.game-state.com/94.177.106.162:7777/430x73_FFFFFF_FF9900_000000_000000.png" alt="www.Game-State.com" style="border-style: none;" /></a> Link to comment Share on other sites More sharing options...
Question
Dynamic
dupa cum spune si titlul cand dau cuiva /w text zice ca ii este blocat whisperu, indiferent ca e admin/playeri sau orice care care vrea sa dea /w nu merge. va rog ajutatima
whisperu
/togwhisper<a href="http://www.game-state.com/94.177.106.162:7777/"><img src="http://www.game-state.com/94.177.106.162:7777/430x73_FFFFFF_FF9900_000000_000000.png" alt="www.Game-State.com" style="border-style: none;" /></a>
Link to comment
Share on other sites
2 answers to this question
Recommended Posts