[pomoc] promjena texta

Započeo sampzone, Maj 31, 2011, 21:04:58 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

mod koji ja koristim: BU

problem: htjeo sam da napravim kioske da prozivodima...negdje oko njih 50 i htjeo sam da se mogu kupiti....ali bilo bi mi puno da dodejm nove boziove i sebi pravim dodatan posao...pa sam zamislio da napravim to ovako....ja da napravim 3D text npr Na prodaju kiosk ID 30.......kada igrac hoce da kupi taj kiosk kuca npr komandu /kupikiosk 30 i da mu se pojavi 3D sa njegovim imenom npr...Bla_Bla kiosk......kako to da izvedem?

dio skripte:/

slike:/

Hvala za pomoc unaprijed!

Pa to dodajes u sbizove evo ti ja kiosk jedan ovo sbizinfo[16] to ti oznacava taj biz ti to postavi u svoj biz samo ID promjeni ja sam ti sve dao samo ti to iskoristi i dodaj svoje kordinate tu ovo SBizzInfo[16][sbTill] += payout ti kazuje da novac ide u taj biz ExtortionSBiz(16, payout); ovo ti oznacava da ide novac onome sto reket ima, SBizzInfo[16][sbProducts]--; a ovo ti kazuje da se broj produkata smanjuje
if(strcmp(cmd, "/kiosk", true) == 0)
{
   if(IsPlayerConnected(playerid))
   {
if (PlayerToPoint(4.0, playerid,x,y,z)) //kiosk
{
if(SBizzInfo[16][sbProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Nema Produkata", 5000, 1);
return 1;
}
ShowPlayerDialog(playerid, 69, DIALOG_STYLE_LIST, "{0049FF}SuperMarket", "Mobitel 150$\nSrecka $500\nImenik $100\nKockica $10\nUpaljac $5\nCigare $30\nKondom $1\nKamera $50\nMaska $500\nSat $100\nOprema za ribolov $150\nKonop $10\nSprej $50\nPovez $10", "U redu", "Odustani");
}
else
           {
       SendClientMessage(playerid, COLOR_GREY, "({F81414}Greska!{C3C3C3}) Ne nalazite se kod Kioska!");
   return 1;
           }
}
return 1;
}

Pod OnDialogResponse dodaj ovo
if(dialogid == 69)
{
   if(response)
{
if (listitem == 0 && 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);
SBizzInfo[16][sbTill] += payout;
ExtortionSBiz(16, payout);
SBizzInfo[16][sbProducts]--;
OnPropUpdate();

   }
   else
   {
       format(string, sizeof(string), "~r~-$%d", 150);
GameTextForPlayer(playerid, string, 5000, 1);
SafeGivePlayerMoney(playerid,-150);
SBizzInfo[16][sbTill] += 150;
ExtortionSBiz(16, 150);
SBizzInfo[16][sbProducts]--;
OnPropUpdate();
   }
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 broj je {FFFFFF}%d", randphone);
SendClientMessage(playerid, SVETLOPLAVA, string);
SendClientMessage(playerid, SVETLOPLAVA, "Ovo uvjek mozete provjeriti kucajuci {FFFFFF}/stats");
SendClientMessage(playerid, SVETLOPLAVA, "Podsjetnik: Sada mozete kucati /help da vidite komande od telefona.");
return 1;
}
else if (listitem == 1 && 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);
SBizzInfo[16][sbTill] += payout;
ExtortionSBiz(16, payout);
SBizzInfo[16][sbProducts]--;
OnPropUpdate();
format(string, sizeof(string), "~r~-$%d", payout);
GameTextForPlayer(playerid, string, 5000, 1);
}
else
{
   SafeGivePlayerMoney(playerid,-500);
SBizzInfo[16][sbTill] += 500;
ExtortionSBiz(16, 500);
SBizzInfo[16][sbProducts]--;
OnPropUpdate();
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);
SBizzInfo[16][sbTill] -= prize;
ExtortionSBiz(16, prize);
SBizzInfo[16][sbProducts]--;
OnPropUpdate();
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 (listitem == 2 && 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);
SBizzInfo[16][sbTill] += payout;
ExtortionSBiz(16, payout);
SBizzInfo[16][sbProducts]--;
OnPropUpdate();
GameTextForPlayer(playerid, "~r~-$10", 5000, 1);
}
else
{
   SafeGivePlayerMoney(playerid,- 10);
SBizzInfo[16][sbTill] += 10;
ExtortionSBiz(16, 10);
SBizzInfo[16][sbProducts]--;
OnPropUpdate();
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, SVETLOPLAVA, string);
SendClientMessage(playerid, SVETLOPLAVA, "Podjsjetnik: Kucajte {FFFFFF}/number <id/name>.");
return 1;
}
else if (listitem == 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);
SBizzInfo[16][sbTill] += payout;
ExtortionSBiz(16, payout);
SBizzInfo[16][sbProducts]--;
OnPropUpdate();
format(string, sizeof(string), "~r~-$%d", payout);
GameTextForPlayer(playerid, string, 5000, 1);
}
else
{
   SafeGivePlayerMoney(playerid,-10);
SBizzInfo[16][sbTill] += 10;
ExtortionSBiz(16, 10);
SBizzInfo[16][sbProducts]--;
                   OnPropUpdate();
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, SVETLOPLAVA, string);
SendClientMessage(playerid, SVETLOPLAVA, "Podjsetnik: Kucajte {FFFFFF}/dice ");
return 1;
}
else if (listitem == 4 && GetPlayerMoney(playerid) > 4)
{
   if(PlayerInfo[playerid][pLighter] != 0)
   {
       SendClientMessage(playerid, COLOR_GREY, "   Vec imate upaljac ! ");
       return 1;
   }
   SafeGivePlayerMoney(playerid, - 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, SVETLOPLAVA, "Kupili ste upaljac.");
   OnPlayerUpdateCustom(playerid);
   return 1;
}
else if (listitem == 5 && GetPlayerMoney(playerid) > 29)
{
   if(PlayerInfo[playerid][pCigarettes] != 0)
   {
       format(string, sizeof(string), "Vec imate %d cigara .", PlayerInfo[playerid][pCigarettes]);
       SendClientMessage(playerid, SVETLOPLAVA, string);
       return 1;
   }
   SafeGivePlayerMoney(playerid, - 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, SVETLOPLAVA, "Kupili ste cigare.");
   SendClientMessage(playerid, SVETLOPLAVA, "Podsjetnik: Sada mozete da kucate /zapali da biste pusili !");
   OnPlayerUpdateCustom(playerid);
}
else if (listitem == 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);
format(string, sizeof(string), "~r~-$%d", payout);
GameTextForPlayer(playerid, string, 5000, 1);
}
else
{
   SafeGivePlayerMoney(playerid,-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, SVETLOPLAVA, string);
return 1;
}
else if (listitem == 7 && 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, SVETLOPLAVA, string);
SafeGivePlayerWeapon(playerid, 43, 20);
return 1;
}
else if (listitem == 8 && 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);
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, SVETLOPLAVA, string);
SendClientMessage(playerid, SVETLOPLAVA, "VODIC: Koristite /maskon i /maskoff");
PlayerInfo[playerid][pMask] = 1;
return 1;
}
else if (listitem == 9 && GetPlayerMoney(playerid) > 99)
{
   if(PlayerInfo[playerid][pWatch] != 0)
   {
       SendClientMessage(playerid, COLOR_GREY, "Vec imate jedan");
       return 1;
   }
   SafeGivePlayerMoney(playerid, - 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, SVETLOPLAVA, "VODIC: /vrijeme");
   SendClientMessage(playerid, SVETLOPLAVA, string);
   PlayerInfo[playerid][pWatch] = 1;
}
else if (listitem == 10 && GetPlayerMoney(playerid) > 149)
{
   if(PlayerInfo[playerid][pFishTool] != 0)
   {
       SendClientMessage(playerid, COLOR_GREY, "Vec ste to kupili !");
       return 1;
   }
   SafeGivePlayerMoney(playerid, - 150);
   format(string, sizeof(string), "~r~-$%d", 150);
   GameTextForPlayer(playerid, string, 5000, 1);
   PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
   SendClientMessage(playerid, SVETLOPLAVA, "Kupili ste opremu za ribolov.");
   PlayerInfo[playerid][pFishTool] = 1;
}
else if (listitem == 11 && GetPlayerMoney(playerid) > 9)
{
   if(Rope[playerid] >= 5)
   {
       SendClientMessage(playerid, COLOR_GREY, " Vec imate 5 konopa !");
       return 1;
   }
   SafeGivePlayerMoney(playerid, - 10);
   format(string, sizeof(string), "~r~-$%d", 10);
   GameTextForPlayer(playerid, string, 5000, 1);
   PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
   SendClientMessage(playerid, SVETLOPLAVA, "Kupili ste konop.");
   SendClientMessage(playerid, SVETLOPLAVA, "Podjsetnik: Sada mozete da koristite /vezi da nekoga vezete.");
   Rope[playerid]++;
}
else if (listitem == 12 && 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);
   SendClientMessage(playerid, COLOR_GRAD4, "Kupili ste sprej.");
   SafeGivePlayerWeapon(playerid, 41, 200);
}
else if (listitem == 13 && GetPlayerMoney(playerid) > 9)
{
   if(Povez[playerid] >= 5)
   {
       SendClientMessage(playerid, COLOR_GREY, "   Vec imate 5 poveza !");
       return 1;
   }
   SafeGivePlayerMoney(playerid, - 10);
   format(string, sizeof(string), "~r~-$%d", 10);
   GameTextForPlayer(playerid, string, 5000, 1);
   PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
   SendClientMessage(playerid, SVETLOPLAVA, "Kupili ste povez.");
   SendClientMessage(playerid, SVETLOPLAVA, "Podjsetnik: Sada mozete da koristite /povez da nekome stavite.");
   Povez[playerid]++;
}
else
   {
SendClientMessage(playerid, COLOR_WHITE, "Nemate dovoljno novca da biste to kupili!");
   }
}

}
Poslednja Izmena: Maj 31, 2011, 21:17:18 POSLE PODNE od Outlawz

znam ja napraviti komandu...za kupocinu u dijalogu.....ali ajde mi pojasni kako da dodam biz novi u cfg i sta trebam u mod da dodajem da mi sve radi kako treba...?

Pa ides ovako ovo 0 ti oznacava da nema vlasnika ovo nito ti kazuje da nemas reketara ovo 7 ti kazuje da je potreban level 7 ovo 60000 ti kazuje cijenu firme ovo kod cijene ti je ulaz u biz a sbizevi nemaju ulaz msm int ovo kod ulaza 0 ti je koliko biz ima novca ovo kod novca ti kazuje da li locked ili otkljucan ovo kod lockeda ti kazuje int ovo kod inta to su ti produkti a ovo max produkti a ovo zadnje cijena produkata sve sam ti objasnio nadam se da kuzis/kontas ;)
0|Drzava|Kiosk|Niko|iovdje|kordinatetvoje|kordinate|7|60000|0|0|1|0|100|100|10000
kad odas sbiz trazis new SBizzInfo i povecas za 1 broj vise ili za koliko si ih ti dodao
Poslednja Izmena: Maj 31, 2011, 21:44:06 POSLE PODNE od Outlawz