TheSheriff Posted April 2, 2015 Posted April 2, 2015 (edited) la CNN, cand ma duc, pot da anunturi unul dupa altul fara ca sa existe un timp anume, adica dau acum un anunt si dupa sa mai pot da altul peste 30 de secunde macar, dar aici dau unul dupa altul si nu exista timp. comanda. if(strcmp(cmd, "/adls", true) == 0 || strcmp(cmd, "/adls", true) == 0) { if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GRAD1, "*You are not {B22222}Logat !"); return 1; } if(PlayerInfo[playerid][pPnumber] == 0) { SendClientMessage(playerid, COLOR_GREY, "You dont have Phone!"); return 1; } if(PlayerInfo[playerid][pLevel] < 3) { SendClientMessage(playerid, COLOR_LIGHTRED2, "* You not have Level 3!"); return 1; } if(PlayerInfo[playerid][pMuted] == 1) { SendClientMessage(playerid, TEAM_CYAN_COLOR, "You have Mute, and cannot use /ad!"); return 1; } if(!PlayerToPoint(3.0, playerid, 844.6591,-1045.4973,25.4305)) { SendClientMessage(playerid, COLOR_GRAD2, "You are not on CNN LS!"); return 1; } GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[150]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_CMD, "[INFO] {FFFFFF} (/ad)vertise [Advert]"); return 1; } spaceGroupsToSpaces(result); trimSideSpaces(result); new word[256],Index;while(Index < strlen(result)) { // check posts on advertising servers and cutting word = strtok(result,Index); if(Adv(word)==1||ZP(word)||U(word)||T(word)||N(word)||PP(word)||P(word)||V(word)||R(word)||PL(word)||ZV(word)||I(word)||ST(word)||PR(word)||DL(word)||RE(word)||VOC(word)||A(word)||NO(word)||TCZ(word)||BOP(word)){ new i=strfind(result,word),j=i+strlen(word)-1; result[i++]='['; while(i<j) {result[i]='|';i++;} result[j]=']'; BanEx(playerid, " Reclama la alt server"); } } if(PlayerInfo[playerid][pMuted] == 1) { SendClientMessage(playerid, TEAM_CYAN_COLOR, "You have Mute."); return 1; } if ((!adds) && (PlayerInfo[playerid][pAdmin] < 1)) { format(string, sizeof(string), " Mai sunt %d pana cand poti sa dai /ad", (addtimer/1000)); SendClientMessage(playerid, COLOR_GRAD2, string); return 1; } new payout = idx * 25; if(GetPlayerMoney(playerid) < payout) { format(string, sizeof(string), "* For %d caracters, you payoff $%d. Ad have been posted.", offset, payout); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); return 1; } GivePlayerMoney(playerid, - payout); SBizzInfo[7][sbTill] += payout*3; ExtortionSBiz(7, payout); format(string, sizeof(string), "{00BF00}Advert placed by:{fff000} %s, {00BF00}Phone:{FFFFFF} %d :{00BF00} %s", sendername,PlayerInfo[playerid][pPnumber],result); OOCNews(TEAM_GROVE_COLOR,string); format(string, sizeof(string), "(AdmInf):Player: %s (ID:%d) :- (Added this Advert)",sendername,playerid); ABroadCast(COLOR_LIGHTRED,string,1); format(string, sizeof(string), "-Money: $%d. caracters: %d.", payout, idx); SendClientMessage(playerid, COLOR_GRAD1, string); if (PlayerInfo[playerid][pAdmin] < 1){SetTimer("AddsOn", addtimer, 3000); adds = 1000;} } return 1; } Edited April 2, 2015 by TheSheriff Quote
AraZel Posted April 2, 2015 Posted April 2, 2015 Doar asta e comanda? Nu exista un public AddsOn? Si vezi ca daca esti admin nu ai timp Quote
TheSheriff Posted April 3, 2015 Author Posted April 3, 2015 (edited) Da, doar aia este comanda, si ca player normal tot asa face spam la CNN. uite si poza http://postimg.org/image/t8ukrxlrb/b1817c91/ Edited April 3, 2015 by TheSheriff Quote
AraZel Posted April 3, 2015 Posted April 3, 2015 Da, doar aia este comanda, si ca player normal tot asa face spam la CNN. O sa ma uit imediat peste ea Quote
AraZel Posted April 3, 2015 Posted April 3, 2015 if(strcmp(cmd, "/adls", true) == 0 || strcmp(cmd, "/adls", true) == 0) { new payout = idx * 25; if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GRAD1, "*You are not {B22222}Logat !"); return 1; } if(PlayerInfo[playerid][pPnumber] == 0) { SendClientMessage(playerid, COLOR_GREY, "You dont have Phone!"); return 1; } if(PlayerInfo[playerid][pLevel] < 3) { SendClientMessage(playerid, COLOR_LIGHTRED2, "* You not have Level 3!"); return 1; } if(PlayerInfo[playerid][pMuted] == 1) { SendClientMessage(playerid, TEAM_CYAN_COLOR, "You have Mute, and cannot use /ad!"); return 1; } if(!PlayerToPoint(3.0, playerid, 844.6591,-1045.4973,25.4305)) { SendClientMessage(playerid, COLOR_GRAD2, "You are not on CNN LS!"); return 1; } GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[150]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_CMD, "[INFO] {FFFFFF} (/ad)vertise [Advert]"); return 1; } spaceGroupsToSpaces(result); trimSideSpaces(result); new word[256],Index;while(Index < strlen(result)) { // check posts on advertising servers and cutting word = strtok(result,Index); if(Adv(word)==1||ZP(word)||U(word)||T(word)||N(word)||PP(word)||P(word)||V(word)||R(word)||PL(word)||ZV(word)||I(word)||ST(word)||PR(word)||DL(word)||RE(word)||VOC(word)||A(word)||NO(word)||TCZ(word)||BOP(word)){ new i=strfind(result,word),j=i+strlen(word)-1; result[i++]='['; while(i<j) {result[i]='|';i++;} result[j]=']'; BanEx(playerid, " Reclama la alt server"); } } if(PlayerInfo[playerid][pMuted] == 1) { SendClientMessage(playerid, TEAM_CYAN_COLOR, "You have Mute."); return 1; } if ((!adds) && (PlayerInfo[playerid][pAdmin] < 1)) { format(string, sizeof(string), " Mai sunt %d pana cand poti sa dai /ad", (addtimer/1000)); SendClientMessage(playerid, COLOR_GRAD2, string); return 1; } else { GivePlayerMoney(playerid, - payout); SBizzInfo[7][sbTill] += payout*3; ExtortionSBiz(7, payout); format(string, sizeof(string), "{00BF00}Advert placed by:{fff000} %s, {00BF00}Phone:{FFFFFF} %d :{00BF00} %s", sendername,PlayerInfo[playerid][pPnumber],result); OOCNews(TEAM_GROVE_COLOR,string); format(string, sizeof(string), "(AdmInf):Player: %s (ID:%d) :- (Added this Advert)",sendername,playerid); ABroadCast(COLOR_LIGHTRED,string,1); format(string, sizeof(string), "-Money: $%d. caracters: %d.", payout, idx); SendClientMessage(playerid, COLOR_GRAD1, string); } if(GetPlayerMoney(playerid) < payout) { format(string, sizeof(string), "* For %d caracters, you payoff $%d. Ad have been posted.", offset, payout); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); return 1; } if (PlayerInfo[playerid][pAdmin] < 1){SetTimer("AddsOn", addtimer, 3000); adds = 1000;} } return 1; } Quote
TheSheriff Posted April 4, 2015 Author Posted April 4, 2015 (edited) ma poate ajuta altcineva? tot nu merge ceea ce mi-a facut arazel Edited April 4, 2015 by TheSheriff Quote
alex6053 Posted April 5, 2015 Posted April 5, 2015 Ce gamemode utilizzi? Dava ii zcmd iti dau eu comanda si tot.. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.