- 0
Problema /ad !
-
Similar Content
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
AlyN.
Problema intalnita (descriere): se poate da ad dupa ad..nu este o limita de timp.Se poate sa ma ajutati?Multumsc.
Ero(area / rile) / warning-(ul / urile):-
Liniile de cod / sursa / script-ul:
Comanda ad:
if(strcmp(cmd, "/advertise", true) == 0 || strcmp(cmd, "/ad", true) == 0) { if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, "[Eroare]: You havent logged in yet !"); return 1; } if(PlayerInfo[playerid][pLevel] < 3) { SendClientMessage(playerid, COLOR_GREY, "[Eroare]: You have to be level 3 to use this function !"); return 1; } if(!PlayerToPoint(3.0,playerid,867.8030,-1056.4480,3239.0859)) { SendClientMessage(playerid, COLOR_GREY, "[Eroare]: You are not at Advertise studio !"); return 1; } if(PlayerInfo[playerid][pAD] == 1) { SendClientMessage(playerid, TEAM_CYAN_COLOR, "[Eroare]: Esti banat pe /ad , data viitoare ai grija ce /ad dai."); return 1; } 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(DetectSPAM(result)) /// Anti-Reclama2 { new advertiser[MAX_PLAYER_NAME]; GetPlayerName(playerid, advertiser, sizeof(advertiser)); format(string, sizeof(string), "[AdmCmd]: %s was silenced 10 minute(s) by NT Bot, reason: [Server Advertising]",advertiser); SendClientMessageToAll(COLOR_LIGHTRED,string); PlayerInfo[playerid][pMuted] = 1; PlayerInfo[playerid][pMuteTime] = 10*60; KickLog(string); return 1; } if(!strlen(result)) { SendClientMessage(playerid, COLOR_GRAD2, "{00A1FF}USAGE{FFFFFF}: (/ad)vertise [advert text]"); return 1; } if ((!adds) && (PlayerInfo[playerid][pAdmin] < 1) && strcmp(sendername, "{FCRB}HeRo.",true) == 0) { format(string, sizeof(string), "[Eroare]: Please try again later %d seconds between Advertisements !", (addtimer, 60)); SendClientMessage(playerid, COLOR_GRAD2, string); return 1; } new payout = idx * 25; if(GetPlayerMoney(playerid) < payout) { format(string, sizeof(string), "[Eroare]: You used %d characters which cost %s, you don't have enough.", offset, DecimalPoint(payout)); SendClientMessage(playerid, COLOR_WHITE, string); return 1; } SafeGivePlayerMoney(playerid, - payout); SBizzInfo[7][sbTill] += payout; ExtortionSBiz(7, payout/2); format(string, sizeof(string), "[Advert] %s, Phone: %d, Name: %s", result, PlayerInfo[playerid][pPnumber], sendername); OOCNews(TEAM_GROVE_COLOR,string); format(string, sizeof(string), "~r~Paid %s~n~~w~Message contained: %d Characters", DecimalPoint(payout), idx); GameTextForPlayer(playerid, string, 5000, 1); if (PlayerInfo[playerid][pAdmin] < 1){SetTimer("AddsOn", addtimer, 0);adds = 0;} } return 1; }Edited by AlyN.9 answers to this question
Recommended Posts