[Pomoc]/ad

Započeo JusT, Septembar 29, 2011, 20:14:49 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 3 gostiju pregledaju ovu temu.

JusT

Skripta koji koristim:GF
Detaljan opis problema:Kako da namjestim da oglas kosta 500$ i kad netko posalje oglas da saceka 60 do novog slanja?

if(strcmp(cmd, "/advertise", true) == 0 || strcmp(cmd, "/ad", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(gPlayerLogged[playerid] == 0)
        {
            SendClientMessage(playerid, COLOR_GREY, "   Nisi ulogiran jos !");
            return 1;
        }
        if(PlayerInfo[playerid][pLevel] >= 2)
        {
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(!strlen(result))
{
SendClientMessage(playerid, COLOR_ORANGE, "Koristite: {FFFFFF} (/ad)vertise [advert text]");
return 1;
}
if ((!adds) && (PlayerInfo[playerid][pAdmin] < 1))
{
format(string, sizeof(string), "   Pokusajte kasnije mora proci %d sekundi izmedu Oglasa !",  (addtimer/1000));
SendClientMessage(playerid, COLOR_GRAD2, string);
return 1;

}
new payout = idx * 25;
if(GetPlayerMoney(playerid) < payout)
        {
            format(string, sizeof(string), "* Iskoristili ste %d znakova koji kostaju $%d, nemate dovoljno novaca.", offset, payout);
             SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
            return 1;
        }
GivePlayerMoney(playerid, - payout);
SBizzInfo[7][sbTill] += payout;
ExtortionSBiz(7, payout);
format(string, sizeof(string), "Oglasavanje | Autor: %s | {F3FF02}Kontakt broj: %d",  sendername, PlayerInfo[playerid][pPnumber]);
OOCNews(TEAM_GROVE_COLOR,string);
format(string, sizeof(string), "{FFFFFF}-%s", result);
OOCNews(TEAM_GROVE_COLOR,string);
format(string, sizeof(string), "~r~Platili Ste $%d~n~~w~Poruka Sadrzi: %d Znakova", payout, idx);
GameTextForPlayer(playerid, string, 5000, 5);
if (PlayerInfo[playerid][pAdmin] < 1){SetTimer("AddsOn", addtimer, 0);adds = 0;}
}
else
{
    SendClientMessage(playerid, COLOR_WHITE, "{F81414}(Odbijeno){CCCCCC} Moras biti level 2");
}
}
return 1;
}

Citat: [CRP|CDM]GaLeB poslato Septembar 29, 2011, 20:14:49 POSLE PODNE
Skripta koji koristim:GF
kad netko posalje oglas da saceka 60 do novog slanja?
to je vec namjesteno :/


a ovo za pare zamijeni
GivePlayerMoney(playerid, - payout);
sa
GivePlayerMoney(playerid, - 500);