[POMOC]POMOC SVIH SKRIPTERA HITNO

Započeo Frile, Mart 04, 2011, 17:42:20 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: GTA RP a ima i u Ravena modu
Detaljan opis problema: hocu da napravim da mi svaki market bude odvojeni biz i kad kupis nesto u prvi market doda se toliko para koliko kosta to sto se kupi samo u kasu tog marketa, i tako za svaki market. a u ravenu sam primjetio da je napravljeno da su posebni bizevi ali kad kupis nedoda ti se nista u kasu
Dio skripte: Bizevi
Neke slike/video za lakse dobivanje pomoci(neobavezno): //

Nisam te bas najbolje razumio.. mozda je bolje da prevedes.
Al bizzevi vremenski dobijaju novac, tj. od servera xd jer komande nisu povezane sa kasom xd :D

Citat: [ЯPF]  K4Я!K3 poslato Mart 04, 2011, 17:52:44 POSLE PODNE
Nisam te bas najbolje razumio.. mozda je bolje da prevedes.
Al bizzevi vremenski dobijaju novac, tj. od servera xd jer komande nisu povezane sa kasom xd :D

nebi da se vremenski dobija nego da napravim da je komanda povezana sa kasom

Citat: Frile poslato Mart 04, 2011, 17:56:13 POSLE PODNE
Citat: [ЯPF]  K4Я!K3 poslato Mart 04, 2011, 17:52:44 POSLE PODNE
Nisam te bas najbolje razumio.. mozda je bolje da prevedes.
Al bizzevi vremenski dobijaju novac, tj. od servera xd jer komande nisu povezane sa kasom xd :D

nebi da se vremenski dobija nego da napravim da je komanda povezana sa kasom

(s)BizzInfo[ID][(s)bTill] += kolko oš; :D
Poslednja Izmena: Mart 04, 2011, 17:59:29 POSLE PODNE od [ЯPF] K4Я!K3

pokusavao sam vec na taj nacin naprimjer samo u prvi market oce da ucita a u drugi nece

Citat: Frile poslato Mart 04, 2011, 18:01:15 POSLE PODNE
pokusavao sam vec na taj nacin naprimjer samo u prvi market oce da ucita a u drugi nece

Postavi ID bizza
Citat
(s)BizzInfo[ID][(s)bTill] += kolko oš; :D

ovisi u koju kasu trebaju ic pare :)

e ovako mi je u komandi /buy pa sad koliko sam shvatio treba ovako da napravim

               GameTextForPlayer(playerid, string, 5000, 1);
SafeGivePlayerMoney(playerid,-150);
BizzInfo[9][bTill] += 150;
ExtortionBiz(9, 150);  //market 1
BizzInfo[10][bTill] += 150;
ExtortionBiz(10, 150);  //market 2

jeli tako
Poslednja Izmena: Mart 04, 2011, 18:11:14 POSLE PODNE od Frile

stavljaj u code tag-u komandu kako bi izbjego cenzuru



ovo mi je citava komanda /buy i sad kako bi trebalo to da ide??

if(strcmp(cmd, "/buy", true) == 0 || strcmp(cmd, "/kupi", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
if (!PlayerToPoint(100, playerid,-25.9305,-138.9480,1003.5469))//centerpoint 24-7
{
SendClientMessage(playerid, COLOR_GRAD2, "   Niste u 24-7 !");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /buy [item number]");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "|_______ 24-7 _______|");
SendClientMessage(playerid, COLOR_GRAD1, "| 1: Telefon $150              2: Srecka $500");
SendClientMessage(playerid, COLOR_GRAD1, "| 3: Imenik $10                4: Kockica $10");
SendClientMessage(playerid, COLOR_GRAD2, "| 5: Povez $20               6: Kondom $1");
SendClientMessage(playerid, COLOR_GRAD3, "| 7: CD-Player $250            8: Kamera $50");
SendClientMessage(playerid, COLOR_GRAD3, "| 9: Maska $500                10: Sat $100");
SendClientMessage(playerid, COLOR_GRAD4, "| 11: Oprema za ribolov $150   12: Konop $10");
SendClientMessage(playerid, COLOR_GRAD4, "| 13: Sprej $50                14: Upaljac $5");
SendClientMessage(playerid, COLOR_GRAD4, "| 15: Cigare $30");
return 1;
}
new item = strval(tmp);
if(BizzInfo[9][bProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Nemamo vise zaliha", 5000, 1);
return 1;
}
if (item == 1 && GetPlayerMoney(playerid) > 149)
{
    if(PlayerInfo[playerid][pTraderPerk] > 0)
    {
new skill = 150 / 100;
new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
new payout = 150 - price;
        format(string, sizeof(string), "~r~-$%d", payout);
GameTextForPlayer(playerid, string, 5000, 1);
SafeGivePlayerMoney(playerid,- payout);
BizzInfo[9][bTill] += payout;
ExtortionBiz(9, payout);
    }
    else
    {
        format(string, sizeof(string), "~r~-$%d", 150);
GameTextForPlayer(playerid, string, 5000, 1);
SafeGivePlayerMoney(playerid,-150);
BizzInfo[9][bTill] += 150;
ExtortionBiz(9, 150);
    }
                PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
new randphone = 100000 + random(899999);//minimum 1000  max 9999
PlayerInfo[playerid][pPnumber] = randphone;
format(string, sizeof(string), "   Kupili ste mobilni, vas novi br je %d", randphone);
SendClientMessage(playerid, COLOR_GRAD4, string);
SendClientMessage(playerid, COLOR_GRAD5, "Ovdje uvjek mozete provjeriti kucajuci /stats");
SendClientMessage(playerid, COLOR_WHITE, "Podsjetnik: Sada mozete kucati /help da vidite komande od telefona.");
return 1;
    }
else if (item == 2 && GetPlayerMoney(playerid) > 500)
    {
    if(PlayerInfo[playerid][pTraderPerk] > 0)
    {
new skill = 500 / 100;
new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
new payout = 500 - price;
SafeGivePlayerMoney(playerid,- payout);
BizzInfo[9][bTill] += payout;
ExtortionBiz(9, payout);
format(string, sizeof(string), "~r~-$%d", payout);
GameTextForPlayer(playerid, string, 5000, 1);
}
else
{
    SafeGivePlayerMoney(playerid,-500);
BizzInfo[9][bTill] += 500;
ExtortionBiz(9, 500);
format(string, sizeof(string), "~r~-$%d", 500);
GameTextForPlayer(playerid, string, 5000, 1);
}
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
new prize;
new symb1[32]; new symb2[32]; new symb3[32];
new randcard1 = random(10);//minimum 1000  max 9999
new randcard2 = random(10);//minimum 1000  max 9999
new randcard3 = random(10);//minimum 1000  max 9999
if(randcard1 >= 5)
{
format(symb1, sizeof(symb1), "~b~]");
randcard1 = 1;
}
else if(randcard1 <= 4 && randcard1 >= 2)
{
format(symb1, sizeof(symb1), "~g~]");
randcard1 = 2;
}
else if(randcard1 < 2)
{
format(symb1, sizeof(symb1), "~y~]");
randcard1 = 3;
}
if(randcard2 >= 5)
{
format(symb2, sizeof(symb2), "~b~]");
randcard2 = 1;
}
else if(randcard2 <= 4 && randcard2 >= 2)
{
format(symb2, sizeof(symb2), "~g~]");
randcard2 = 2;
}
else if(randcard2 < 2)
{
format(symb2, sizeof(symb2), "~y~]");
randcard2 = 3;
}
if(randcard3 >= 5)
{
format(symb3, sizeof(symb3), "~b~]");
randcard3 = 1;
}
else if(randcard3 <= 4 && randcard3 >= 2)
{
format(symb3, sizeof(symb3), "~g~]");
randcard3 = 2;
}
else if(randcard3 < 2)
{
format(symb3, sizeof(symb3), "~y~]");
randcard3 = 3;
}
if(randcard1 == randcard2 && randcard1 == randcard3)
{
if(randcard1 > 5)
{
prize = 2500;
}
if(randcard1 <= 4 && randcard1 >= 2)
{
prize = 1500;
}
if(randcard1 < 2)
{
prize = 500;
}
SafeGivePlayerMoney(playerid,prize);
BizzInfo[9][bTill] -= prize;
ExtortionBiz(9, prize);
format(string, sizeof(string), "%s %s %s ~n~~n~~w~~g~$%d",symb1,symb2,symb3, prize);
}
else
{
format(string, sizeof(string), "%s %s %s ~n~~n~~w~~r~$0",symb1,symb2,symb3);
}
GameTextForPlayer(playerid, string, 3000, 3);
return 1;
}
else if (item == 3 && GetPlayerMoney(playerid) > 10)
{
    if(PlayerInfo[playerid][pTraderPerk] > 0)
    {
new skill = 10 / 100;
new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
new payout = 10 - price;
SafeGivePlayerMoney(playerid,- payout);
BizzInfo[9][bTill] += payout;
ExtortionBiz(9, payout);
GameTextForPlayer(playerid, "~r~-$10", 5000, 1);
}
else
{
    SafeGivePlayerMoney(playerid,- 10);
BizzInfo[9][bTill] += 10;
ExtortionBiz(9, 10);
format(string, sizeof(string), "~r~-$%d", 100);
GameTextForPlayer(playerid, string, 5000, 1);
}
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                PlayerInfo[playerid][pPhoneBook] = 1;
format(string, sizeof(string), "   Kupili ste imenik, sada mozete vidjeti brojeve od igraca !");
SendClientMessage(playerid, COLOR_GRAD4, string);
SendClientMessage(playerid, COLOR_WHITE, "Podjsjetnik: Kucajte /number <id/name>.");
return 1;
}
else if (item == 4 && GetPlayerMoney(playerid) > 10)
{
    if(PlayerInfo[playerid][pTraderPerk] > 0)
    {
new skill = 10 / 100;
new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
new payout = 10 - price;
SafeGivePlayerMoney(playerid,- payout);
BizzInfo[9][bTill] += payout;
ExtortionBiz(9, payout);
format(string, sizeof(string), "~r~-$%d", payout);
GameTextForPlayer(playerid, string, 5000, 1);
}
else
{
    SafeGivePlayerMoney(playerid,-10);
BizzInfo[9][bTill] += 10;
ExtortionBiz(9, 10);
format(string, sizeof(string), "~r~-$%d", 10);
GameTextForPlayer(playerid, string, 5000, 1);
}
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
gDice[playerid] = 1;
format(string, sizeof(string), "   Kupili ste kockicu, sada je mozete bacati.");
SendClientMessage(playerid, COLOR_GRAD4, string);
SendClientMessage(playerid, COLOR_WHITE, "Podjsetnik: Kucajte /dice ");
return 1;
}
else if (item == 5 && GetPlayerMoney(playerid) > 20)
{
if(PlayerInfo[playerid][pTraderPerk] > 0)
    {
new skill = 20 / 100;
new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
new payout = 150 - price;
        format(string, sizeof(string), "~r~-$%d", payout);
GameTextForPlayer(playerid, string, 5000, 1);
SafeGivePlayerMoney(playerid,- payout);
BizzInfo[9][bTill] += payout;
ExtortionBiz(9, payout);
    }
    else
    {
        format(string, sizeof(string), "~r~-$%d", 150);
GameTextForPlayer(playerid, string, 5000, 1);
SafeGivePlayerMoney(playerid,-20);
BizzInfo[9][bTill] += 20;
ExtortionBiz(9, 20);
    }
    PlayerInfo[playerid][pFuel] = 20;
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    SendClientMessage(playerid, COLOR_WHITE, "Potsjetnik: Kucajte /fillup");
    GameTextForPlayer(playerid, "~r~-$20", 5000, 1);
return 1;
}
else if (item == 6 && GetPlayerMoney(playerid) > 1)
{
    if(PlayerInfo[playerid][pTraderPerk] > 0)
    {
new skill = 1 / 100;
new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
new payout = 1 - price;
SafeGivePlayerMoney(playerid,- payout);
BizzInfo[9][bTill] += payout;
ExtortionBiz(9, payout);
format(string, sizeof(string), "~r~-$%d", payout);
GameTextForPlayer(playerid, string, 5000, 1);
}
else
{
    SafeGivePlayerMoney(playerid,-1);
    BizzInfo[9][bTill] += 1;
ExtortionBiz(9, 1);
format(string, sizeof(string), "~r~-$%d", 1);
GameTextForPlayer(playerid, string, 5000, 1);
}
Condom[playerid] ++;
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "Kupili ste kondom.");
SendClientMessage(playerid, COLOR_GRAD4, string);
return 1;
}
else if (item == 7 && GetPlayerMoney(playerid) > 250)
{
    if(PlayerInfo[playerid][pTraderPerk] > 0)
    {
new skill = 250 / 100;
new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
new payout = 250 - price;
SafeGivePlayerMoney(playerid, - payout);
BizzInfo[9][bTill] += payout;
ExtortionBiz(9, payout);
format(string, sizeof(string), "~r~-$%d", payout);
GameTextForPlayer(playerid, string, 5000, 1);
}
else
{
    SafeGivePlayerMoney(playerid, - 250);
    BizzInfo[9][bTill] += 250;
ExtortionBiz(9, 250);
format(string, sizeof(string), "~r~-$%d", 250);
GameTextForPlayer(playerid, string, 5000, 1);
}
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "Kupili ste CD-Player.");
SendClientMessage(playerid, COLOR_GRAD4, string);
SendClientMessage(playerid, COLOR_WHITE, "Potsjetnik: Kucajte /music");
PlayerInfo[playerid][pCrashed] = 1;
return 1;
}
else if (item == 8 && GetPlayerMoney(playerid) > 49)
{
SafeGivePlayerMoney(playerid, - 50);
format(string, sizeof(string), "~r~-$%d", 50);
GameTextForPlayer(playerid, string, 5000, 1);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "Kupili ste kameru.");
SendClientMessage(playerid, COLOR_GRAD4, string);
SafeGivePlayerWeapon(playerid, 43, 20);
return 1;
}
else if (item == 9 && GetPlayerMoney(playerid) > 499)
{
    if(PlayerInfo[playerid][pLevel] < 5)
    {
SendClientMessage(playerid, COLOR_GREY, "Morate biti level 5 da biste ovo kupili.");
return 1;
    }
    if(PlayerInfo[playerid][pMask] != 0)
    {
        SendClientMessage(playerid, COLOR_GREY, "Vec imate jednu.");
return 1;
    }
    if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
    {
                    GameTextForPlayer(playerid, "~w~Besplatno", 5000, 1);
}
else
{
    SafeGivePlayerMoney(playerid, - 500);
    BizzInfo[9][bTill] += 500;
ExtortionBiz(9, 500);
format(string, sizeof(string), "~r~-$%d", 500);
GameTextForPlayer(playerid, string, 5000, 1);
}
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "Kupili ste masku.");
GameTextForPlayer(playerid, string, 5000, 1);
SendClientMessage(playerid, COLOR_GRAD4, string);
SendClientMessage(playerid, COLOR_WHITE, "VODIC: Koristite /maskon i /maskoff");
PlayerInfo[playerid][pMask] = 1;
return 1;
}
else if (item == 10 && GetPlayerMoney(playerid) > 99)
{
    if(PlayerInfo[playerid][pWatch] != 0)
    {
        SendClientMessage(playerid, COLOR_GREY, "Vec imate jedan.");
        return 1;
    }
    SafeGivePlayerMoney(playerid, - 100);
    BizzInfo[9][bTill] += 100;
    ExtortionBiz(9, 100);
    format(string, sizeof(string), "~r~-$%d", 100);
    GameTextForPlayer(playerid, string, 5000, 1);
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    format(string, sizeof(string), "Kupili ste sat.");
    SendClientMessage(playerid, COLOR_WHITE, "VODIC: /vrijeme");
    SendClientMessage(playerid, COLOR_GRAD4, string);
    PlayerInfo[playerid][pWatch] = 1;
}
else if (item == 11 && GetPlayerMoney(playerid) > 149)
{
    if(PlayerInfo[playerid][pFishTool] != 0)
    {
        SendClientMessage(playerid, COLOR_GREY, "   Vec ste to kupili !");
        return 1;
    }
    SafeGivePlayerMoney(playerid, - 150);
    BizzInfo[9][bTill] += 150;
    ExtortionBiz(9, 150);
    format(string, sizeof(string), "~r~-$%d", 150);
    GameTextForPlayer(playerid, string, 5000, 1);
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    SendClientMessage(playerid, COLOR_GRAD4, "Kupili ste opremu za ribolov.");
    PlayerInfo[playerid][pFishTool] = 1;
}
else if (item == 12 && GetPlayerMoney(playerid) > 9)
{
    if(Rope[playerid] >= 5)
    {
        SendClientMessage(playerid, COLOR_GREY, "   Vec imate 5 konopa !");
        return 1;
    }
    SafeGivePlayerMoney(playerid, - 10);
    BizzInfo[9][bTill] += 10;
    ExtortionBiz(9, 10);
    format(string, sizeof(string), "~r~-$%d", 10);
    GameTextForPlayer(playerid, string, 5000, 1);
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    SendClientMessage(playerid, COLOR_GRAD4, "Kupili ste konop.");
    SendClientMessage(playerid, COLOR_GRAD4, "Podjsetnik: Sada mozete da koristite /tie da nekoga vezete.");
    Rope[playerid]++;
}
else if (item == 13 && GetPlayerMoney(playerid) > 49)
{
    SafeGivePlayerMoney(playerid, - 50);
    BizzInfo[9][bTill] += 50;
    ExtortionBiz(9, 50);
    format(string, sizeof(string), "~r~-$%d", 50);
    GameTextForPlayer(playerid, string, 5000, 1);
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    SendClientMessage(playerid, COLOR_GRAD4, "Kupili ste sprej.");
    SafeGivePlayerWeapon(playerid, 41, 200);
}
else if (item == 14 && GetPlayerMoney(playerid) > 4)
{
    if(PlayerInfo[playerid][pLighter] != 0)
    {
        SendClientMessage(playerid, COLOR_GREY, "   Vec imate upaljac ! ");
        return 1;
    }
    SafeGivePlayerMoney(playerid, - 5);
    BizzInfo[9][bTill] += 5;
    ExtortionBiz(9, 5);
    PlayerInfo[playerid][pLighter] = 30;
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    format(string, sizeof(string), "~r~-$%d", 5);
    GameTextForPlayer(playerid, string, 5000, 1);
    SendClientMessage(playerid, COLOR_GRAD4, "Kupili ste upaljac.");
    OnPlayerUpdate(playerid);
    return 1;
}
else if (item == 15 && GetPlayerMoney(playerid) > 29)
{
    if(PlayerInfo[playerid][pCigarettes] != 0)
    {
        format(string, sizeof(string), "   Vec imate %d cigara .", PlayerInfo[playerid][pCigarettes]);
        SendClientMessage(playerid, COLOR_GREY, string);
        return 1;
    }
    SafeGivePlayerMoney(playerid, - 30);
    BizzInfo[9][bTill] += 30;
    ExtortionBiz(9, 30);
    PlayerInfo[playerid][pCigarettes] = 20;
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    format(string, sizeof(string), "~r~-$%d", 30);
    GameTextForPlayer(playerid, string, 5000, 1);
    SendClientMessage(playerid, COLOR_GRAD4, "Kupili ste cigare.");
    SendClientMessage(playerid, COLOR_WHITE, "Podsjetnik: Sada mozete da kucate /smoke da biste pusili !");
    OnPlayerUpdate(playerid);
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "   Nemate dovoljno novca da biste to kupili !");
}
}
return 1;
}

koliko vidim, svaka stvar je povezana sa biznisom Br. 9
trebas dodati provjeru za biznise kako bi server mogao odrediti u kom se biznisu igrac nalazi da bi novac dodao u odgovarajucu kasu



Citat: [BU] Gigi_Falcone poslato Mart 04, 2011, 18:15:10 POSLE PODNE
koliko vidim, svaka stvar je povezana sa biznisom Br. 9
trebas dodati provjeru za biznise kako bi server mogao odrediti u kom se biznisu igrac nalazi da bi novac dodao u odgovarajucu kasu

probao sam da stavim preko playertopoint i dodao vise ovih za naprimjer da doda u kasu 9 ili 10 ali opet nije htjelo, kako bi mogao to da uradim jer vec nekolika dana pokusavam to rijesiti

najbolje ti je da probas naci neku skriptu na forumu dje je to napravljeno

trazio sam ali opet nista, zna li neko kako ovo da napravim  :'(  :'(  :'(

Citat: DejanNK poslato Mart 04, 2011, 18:46:12 POSLE PODNE
najbolje ti je da probas naci neku skriptu na forumu dje je to napravljeno

to uopste nije najbolje, cak u stvari to je najgora solucija, kako ce sam naskriptat nesto ili rijesit neki problem ako bude samo skidao stvari?  >:(

ONTOPIC:  kako se dolazi do te cmd /buy? da li igrac ulazi u biznis? da li mu se mjenja virtual world? ili ima li bilo koji nacin na koji se provjerava u koji je trenutno biznis?  playertopoint ti nece pomoci ako koristis isti enterijer za sve markete, tj biznise koji koriste tu komandu /buy, jer ces uvjek biti na istom mjestu, nebitno sto si u drugi biz uso, pa ce server dodavat samo 1 kasi pare
Poslednja Izmena: Mart 04, 2011, 19:36:16 POSLE PODNE od [BU] Gigi_Falcone



Citat: [BU] Gigi_Falcone poslato Mart 04, 2011, 19:34:27 POSLE PODNE
Citat: DejanNK poslato Mart 04, 2011, 18:46:12 POSLE PODNE
najbolje ti je da probas naci neku skriptu na forumu dje je to napravljeno

to uopste nije najbolje, cak u stvari to je najgora solucija, kako ce sam naskriptat nesto ili rijesit neki problem ako bude samo skidao stvari?  >:(

ONTOPIC:  kako se dolazi do te cmd /buy? da li igrac ulazi u biznis? da li mu se mjenja virtual world? ili ima li bilo koji nacin na koji se provjerava u koji je trenutno biznis?  playertopoint ti nece pomoci ako koristis isti enterijer za sve markete, tj biznise koji koriste tu komandu /buy, jer ces uvjek biti na istom mjestu, nebitno sto si u drugi biz uso, pa ce server dodavat samo 1 kasi pare

stavljao sam u svaki market razliciti interior