[Pomoc] /ad Oglas

Započeo Lucic | Digital Hosting, Septembar 30, 2011, 21:16:15 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Skripta koju koristim: GTARP
Detaljan opis problema: Zz ljudi kako da Napravim Kad neko da Oglas Da mi ovako Bude
Dio skripte:if(strcmp(cmd, "/advertise", true) == 0 || strcmp(cmd, "/ad", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(gPlayerLogged[playerid] == 0)
        {
            SendClientMessage(playerid, COLOR_GREY, "   Niste se prijavili !");
            return 1;
        }
        if(PlayerInfo[playerid][pLevel] < 2)
        {
            SendClientMessage(playerid, COLOR_GREY, "   Morate biti lvl 2 da koristite ovu funkciju !");
            return 1;
        }
        if(!PlayerToPoint(3.0,playerid,1737.5134,-1270.8007,13.5446))
        {
            SendClientMessage(playerid, COLOR_GREY, "   Niste u ABC studiju !");
            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(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: (/ad)vertise [advert text]");
return 1;
}
if ((!adds) && (PlayerInfo[playerid][pAdmin] < 1))
{
format(string, sizeof(string), "   Molimo pokusajte jer treba da prodje %d sekundi izmedju reklama  !",  (addtimer/1000));
SendClientMessage(playerid, COLOR_GRAD2, string);
return 1;

}
new payout = idx * 5;
if(GetPlayerMoney(playerid) < payout)
        {
            format(string, sizeof(string), "* Vi ste iskoristili %d slova sto kosta $%d, nemate dovoljno novca.", offset, payout);
            SendClientMessage(playerid, COLOR_WHITE, string);
            return 1;
        }
SafeGivePlayerMoney(playerid, - payout);
SBizzInfo[7][sbTill] += payout;
ExtortionSBiz(7, payout);
format(string, sizeof(string), "[Advert] %s, Br: %d, Ime: %s",  result, PlayerInfo[playerid][pPnumber], sendername);
OOCNews(TEAM_GROVE_COLOR,string);
format(string, sizeof(string), "~r~Racun $%d~n~~w~Poruka je sadrzala: %d Slova", payout, idx);
GameTextForPlayer(playerid, string, 5000, 1);
if (PlayerInfo[playerid][pAdmin] < 1){SetTimer("AddsOn", addtimer, 0);adds = 0;}
}
return 1;
}


Slike: http://www.dodaj.rs/f/1M/Da/4uZRcYuz/sa-mp-001.png