- 0
problema comanda /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
Mihai94TDI
va salut, care este problema la aceasta comanda
YCMD:ad(playerid, params[], help) {
if(AdTimer[playerid] != 0) return SCM(playerid, COLOR_LGREEN, "Ai pus un anunt recent. Foloseste comanda /myad pentru a-l vedea.");
new string[264],idx;
if(!PlayerInfo[playerid][pPhone]) return SCM(playerid, COLOR_LGREEN, "Nu ai un telefon.");
if(PlayerInfo[playerid][pMuted] == 1) {
format(string, sizeof(string), "You can't talk right now! You are muted. (%d seconds)",PlayerInfo[playerid][pMuteTime]);
SCM(playerid, COLOR_GREY, string);
return true;
}
if(PlayerInfo[playerid][pLevel] < 5) return SCM(playerid, COLOR_GREY, "Ai nevoie de nivel 5 pentru a da un anunt!");
new length = strlen(params);
while ((idx < length) && (params[idx] <= ' ')) idx++;
new offset = idx, result[264];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) {
result[idx - offset] = params[idx];
idx++;
}
result[idx - offset] = EOS;
new totalads = TotalAds()+1;
if(PlayerToPoint(10, playerid, BizzInfo[14][bEntranceX], BizzInfo[14][bEntranceY], BizzInfo[14][bEntranceZ])) {
if(!strlen(result)) return SCM(playerid, COLOR_GREY, "Syntax: {FFFFFF}/ad <Text>");
if(FaceReclama(result)) return Reclama(playerid, result);
new payout = BizzInfo[14][bFee];
if(PlayerMoney(playerid, payout)) {
format(string, sizeof(string), "* Ai folosit %d caractere si anuntul costa $%s, Nu ai banii necesari", offset, FormatNumbers(payout));
SCM(playerid, COLOR_WHITE, string);
return true;
}
GivePlayerCash(playerid, 0, payout);
format(string, sizeof(string), "~r~Ai platit $%d~n~~w~Mesajul contine: %d caractere", payout, idx);
GameTextForPlayer(playerid, string, 5000, 5);
format(AdText[playerid], 256, result);
format(string, sizeof(string), "(Preview ad) %s ({FFFFFF}%d{00D900}): %s", GetName(playerid), playerid, result);
SendStaffMessage(0x00D900FF, string);
AdTimer[playerid] = totalads*60;
new timer;
timer = SetTimerEx("Advertisment", totalads*60000, 0, "d", playerid);
SetPVarInt(playerid, "AdTimer", timer);
format(string, sizeof(string), "Anuntul tau va fi afisat in %d minute (%d secunde).", AdTimer[playerid]/60, AdTimer[playerid]);
SCM(playerid, -1, string);
BizzInfo[14][bBalance] += payout;
new str[128];
mysql_format(SQL,str,128,"UPDATE bizz SET `Till`='%d',`Products`='%d' WHERE `ID`='1'",BizzInfo[14][bBalance],BizzInfo[14][bProducts]);
mysql_tquery(SQL,str, "", "");
}
else SCM(playerid, -1, "Nu esti la CNN.");
return true;
}
nu pot plasa nici un anunt la cnn, ma duc la cnn si dau /ad text si imi zice Nu esti la CNN.
5 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now