- 0
Problemă comandă /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
Gawitkkk
Problema intalnita (descriere): Când folosesc comanda /ad nu îmi ia cat este setat biz fee-ul. Vreau ca atunci când public un ad să îmi ia fix cât este setat biz fee-ul.
Ero(area / rile) / warning-(ul / urile): -
Liniile de cod / sursa / script-ul(obligatoriu):
CMD:ad(playerid,params[]) { if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first."); if(IsPlayerConnected(playerid)) { if(IsPlayerInAnyVehicle(playerid)) return SCM(playerid,COLOR_WHITE,"{FFB870}Error: Command are inaccessible on foot."); new string[264],sendername[25],idx; if(PlayerInfo[playerid][pMuted] == 1) { format(string, sizeof(string), "You can not speak, you have been silenced for %d seconds.",PlayerInfo[playerid][pMuteTime]); SendClientMessage(playerid, COLOR_LIGHTRED, string); return 1; } if(PlayerInfo[playerid][pLevel] < 3) return SendClientMessage(playerid, COLOR_WHITE, "{FFB870}You don't have level 3."); if(IsPlayerInRangeOfPoint(playerid,5.0,1111.33,-1796.93,16.5938) || IsPlayerInRangeOfPoint(playerid,5.0,2079.6287,2046.1179,11.0579)) { GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(params); while ((idx < length) && (params[idx] <= ' ')) { idx++; } new offset = idx; new result[264]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = params[idx]; idx++; } result[idx - offset] = EOS; for(new s = 0; s < num_words; s++) { new pos; while((pos = strfind(result,Swears,true)) != -1) for(new i = pos, j = pos + strlen(Swears); i < j; i++) { result = '*'; } } if(!strlen(result)) { SendClientMessage(playerid, COLOR_WHITE, "{B8DBFF}Synthax: /ad <Text>"); return 1; } new addd = -1, playeradd = 0; for(new i = 0; i < sizeof(AdvMSG) && addd == -1; i++) { if(strlen(AdvMSG) < 20) addd = i; if(strcmp(AdvPlayer,sendername,true) == 0 && strlen(AdvPlayer) == strlen(sendername)) playeradd = 1; } if(addd == -1) return SendClientMessage(playerid, COLOR_WHITE, "{FFB870}Advertisement list is full."); if(playeradd == 1) return SendClientMessage(playerid, COLOR_WHITE, "{FFB870}You already placed an advertisement."); new payout = idx * 150; if(GetPlayerCash(playerid) < payout) { format(string, sizeof(string), "{FFB870}* You used %d characters which cost $%s, you don't have enough.", offset, FormatNumber(payout)); SendClientMessage(playerid, COLOR_WHITE, string); return 1; } GivePlayerCash(playerid, - payout); format(AdvMSG[addd], 256, "{00D900}Ad placed by %s (Phone: {FFFFFF}%d{00D900}): %s",sendername,PlayerInfo[playerid][pPnumber],result); format(AdvPlayer[addd], 24,"%s",sendername); format(string, sizeof(string), "~r~Paid $%d~n~~w~Message contained: %d Characters", payout, idx); GameTextForPlayer(playerid, string, 5000, 5); SCM(playerid,COLOR_WHITE,"You ad will be showen in 30 seconds."); if(IsPlayerInRangeOfPoint(playerid,5.0,1111.33,-1796.93,16.5938)) { SBizzInfo[1][sbTill] += payout; SBizzInfo[1][sbProducts]--; SBUpdate(1,sbTillx); SBUpdate(1,sbProductsx); } else if(IsPlayerInRangeOfPoint(playerid,5.0,2079.6287,2046.1179,11.0579)) { SBizzInfo[32][sbTill] += payout; SBizzInfo[32][sbProducts]--; SBUpdate(32,sbTillx); SBUpdate(32,sbProductsx); } } else return SendClientMessage(playerid, COLOR_WHITE, "{FFB870}You are not near to an advertising agency."); } return 1; }Imagini / Video (optional): -
Ati incercat sa rezolvati singur?: Da...
4 answers to this question
Recommended Posts