[Pomoc]/oglas /ad

Započeo ...Nikola...
24. Jun 2011.
1,152
pregleda
6
postova
Deleted User
Obrisan korisnik
24. Jun 2011.
Radice ovako evo probaj:
	if(strcmp(cmd, "/oglas", true) == 0 || strcmp(cmd, "/ad", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(gPlayerLogged == 0)
        {
            SendClientMessage(playerid, COLOR_GREY, "  Niste se prijavili !");
            return 1;
        }
        if(PlayerInfo < 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 RSC studiju !");
            return 1;
        }
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext <= ' '))
{
idx++;
}
new offset = idx;
new result;
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext;
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koristi: /ad ");
return 1;
}
if ((!adds) && (PlayerInfo < 1))
{
format(string, sizeof(string), "  Molimo pokusajte kasnije jer izmenju golasa treba da prodje: %d sekundi!",  (addtimer/1000));
SendClientMessage(playerid, COLOR_GRAD2, string);
return 1;

}
new payout = idx * 5;
if(GetPlayerMoney(playerid) < 50)
        {
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, -50);
SBizzInfo += 50;
ExtortionSBiz(7);
format(string, sizeof(string), " %s, Br: %d, Ime: %s",  result, PlayerInfo, sendername);
OOCNews(TEAM_GROVE_COLOR,string);
format(string, sizeof(string), "~r~Racun $50~n~~w~Poruka je sadrzala: %d Slova", idx);
GameTextForPlayer(playerid, string, 5000, 1);
if (PlayerInfo < 1){SetTimer("AddsOn", addtimer, 0);adds = 0;}
}
return 1;
}
Deleted User
Obrisan korisnik
25. Jun 2011.
Dao sam ti to samo treba da uredis 😉
Vidi
if(strcmp(cmd, "/oglas", true) == 0 || strcmp(cmd, "/ad", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(gPlayerLogged == 0)
        {
            SendClientMessage(playerid, COLOR_GREY, "  Niste se prijavili !");
            return 1;
        }
        if(PlayerInfo < 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 RSC studiju !");
            return 1;
        }
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext <= ' '))
{
idx++;
}
new offset = idx;
new result;
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext;
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koristi: /ad ");
return 1;
}
if ((!adds) && (PlayerInfo < 1))
{
format(string, sizeof(string), "  Molimo pokusajte kasnije jer izmenju golasa treba da prodje: %d sekundi!",  (addtimer/1000));
SendClientMessage(playerid, COLOR_GRAD2, string);
return 1;

}
new payout = idx * 5;
if(GetPlayerMoney(playerid) < 50)//Proverava koliko ima para
        {
format(string, sizeof(string), "Nemate dovoljno novca za oglas ");
            SendClientMessage(playerid, COLOR_WHITE, string);
            return 1;
        }
SafeGivePlayerMoney(playerid, -50);//ODuzima mu pare
SBizzInfo += 50;//Daje u bizz $50
ExtortionSBiz(7);
format(string, sizeof(string), " %s, Br: %d, Ime: %s",  result, PlayerInfo, sendername);
OOCNews(TEAM_GROVE_COLOR,string);
format(string, sizeof(string), "~r~Racun $50~n~~w~");
GameTextForPlayer(playerid, string, 5000, 1);
if (PlayerInfo < 1){SetTimer("AddsOn", addtimer, 0);adds = 0;}
}
return 1;
}
Deleted User
Obrisan korisnik
26. Jun 2011.
Omg,Pa ispravio ti je ono sto ti ne valja,copy njegovo i zameni sa tvojim!
Deleted User
Obrisan korisnik
26. Jun 2011.
Boki Pro wrote on June 26, 2011, 10:13 am:
Ma sve valja ja sam to stavio pod // ,NE Razumete VI To.

DA Li moze neko ko razume da mi pomogne ako ne mozete LOCK

Aj ponovo objasni sta ti neradi. Stavio sam ti da ti oduzima $50 (bez slova) i da daje u biz $50 i sklonio da neplacas slova. I sta tu nevalja sta si ti jos hteo da dodas? To si napisao u prvom postu samo to da se uradi. Jel si ti uopste testirao ovo pa da vidis da li radi?
Ralph
4
Made Man
26. Jun 2011.
Boki Pro wrote on June 26, 2011, 1:21 pm:
ma ja ocu samo da uzima 50$ da nema biza ni nista samo da skida pare i bez slova ono da napljacuje.


pa to ti je i uradjeno :S :S :S :S te pare idu u biz ko posjeduje firmu za oglasavanje..sto je vise RP... sta jos hoces :S ?
Deleted User
Obrisan korisnik
26. Jun 2011.
Boki Pro wrote on June 26, 2011, 1:21 pm:
ma ja ocu samo da uzima 50$ da nema biza ni nista samo da skida pare i bez slova ono da napljacuje.

Stavio sam da ti skida 50$ i da nenapljacuje slova
Ako hoces da sklonis da pare neidu u biz obrisi ovu liniju i pare nece ici u biz.
SBizzInfo += 50;

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha