[Pomoc] Ne razumem o.O

Započeo []Flynâ„¢, Januar 30, 2011, 22:43:19 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Imam komandu /pica i /meni u dialogu i kad igrac odabere stvar koju ce da pojede/popije njemu se skida helt umesto da mu stavi :/ Kod je 100% ispravan(bar ja tako mislim) Evo ga :

if(dialogid == 41)
{
if(response)
{
    if(listitem == 0)
{
JB_GivePlayerMoney(playerid, -5);
ApplyAnimation(playerid,"FOOD","EAT_Burger",4.1,0,1,1,0,1);
SetPlayerHealth(playerid, 25);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s jede Pizzu.", sendername);
ProxDetector(30.0, playerid, string, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
}
if(listitem == 1)
{
JB_GivePlayerMoney(playerid, - 5);
                ApplyAnimation(playerid,"FOOD","EAT_Burger",4.1,0,1,1,0,1);
SetPlayerHealth(playerid, 25);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s jede Burek.", sendername);
ProxDetector(30.0, playerid, string, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
}
if(listitem == 2)
{
JB_GivePlayerMoney(playerid, -6);
                ApplyAnimation(playerid,"FOOD","EAT_Burger",4.1,0,1,1,0,1);
SetPlayerHealth(playerid, 25);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s jede HotDog.", sendername);
ProxDetector(30.0, playerid, string, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
}
if(listitem == 3)
{
JB_GivePlayerMoney(playerid, -7);
                ApplyAnimation(playerid,"FOOD","EAT_Burger",4.1,0,1,1,0,1);
SetPlayerHealth(playerid, 25);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s jede Sandwich.", sendername);
ProxDetector(30.0, playerid, string, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
}
if(listitem == 4)
{
JB_GivePlayerMoney(playerid, -8);
                ApplyAnimation(playerid,"FOOD","EAT_Burger",4.1,0,1,1,0,1);
SetPlayerHealth(playerid, 25);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s jede Hamburger.", sendername);
ProxDetector(30.0, playerid, string, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
}
if(listitem == 5)
{
JB_GivePlayerMoney(playerid, -10);
                ApplyAnimation(playerid,"FOOD","EAT_Burger",4.1,0,1,1,0,1);
SetPlayerHealth(playerid, 25);
                GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s jede Pljeskavicu.", sendername);
ProxDetector(30.0, playerid, string, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
}
if(listitem == 6)
{
JB_GivePlayerMoney(playerid, -10);
                ApplyAnimation(playerid,"FOOD","EAT_Burger",4.1,0,1,1,0,1);
SetPlayerHealth(playerid, 25);
                GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s jede Rostilj.", sendername);
ProxDetector(30.0, playerid, string, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
}
if(listitem == 7)
{
JB_GivePlayerMoney(playerid, -10);
                ApplyAnimation(playerid,"FOOD","EAT_Burger",4.1,0,1,1,0,1);
SetPlayerHealth(playerid, 25);
                GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s jede Pileca rebarca.", sendername);
ProxDetector(30.0, playerid, string, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
}
}
return 1;
}


if(dialogid == 40)
{
if(response)
{
    if(listitem == 0)
{
JB_GivePlayerMoney(playerid, - 5);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
SetPlayerHealth(playerid,30);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s pije Vodu.", sendername);
ProxDetector(30.0, playerid, string, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
}
if(listitem == 1)
{
JB_GivePlayerMoney(playerid, - 5);
                SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
SetPlayerHealth(playerid,30);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s pije Kiselu vodu.", sendername);
ProxDetector(30.0, playerid, string, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
}
if(listitem == 2)
{
JB_GivePlayerMoney(playerid, - 6);
                SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
SetPlayerHealth(playerid,30);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s pije LaVitu.", sendername);
ProxDetector(30.0, playerid, string, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
}
if(listitem == 3)
{
JB_GivePlayerMoney(playerid, - 7);
                SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
SetPlayerHealth(playerid,30);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s pije Fantu.", sendername);
ProxDetector(30.0, playerid, string, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
}
if(listitem == 4)
{
JB_GivePlayerMoney(playerid, - 8);
                SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
SetPlayerHealth(playerid,30);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s pije Pepsi.", sendername);
ProxDetector(30.0, playerid, string, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
}
if(listitem == 5)
{
JB_GivePlayerMoney(playerid, - 10);
                SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
SetPlayerHealth(playerid,30);
                GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s pije CocaColu.", sendername);
ProxDetector(30.0, playerid, string, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
}
}
return 1;
}


if(dialogid == 33)
{
if(response)
{
    if(listitem == 0)
{
JB_GivePlayerMoney(playerid, - 5);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
SetPlayerHealth(playerid,30);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s pije Vodu.", sendername);
ProxDetector(30.0, playerid, string, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
}
if(listitem == 1)
{
JB_GivePlayerMoney(playerid, - 5);
                SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
SetPlayerHealth(playerid,30);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s pije Kiselu vodu.", sendername);
ProxDetector(30.0, playerid, string, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
}
if(listitem == 2)
{
JB_GivePlayerMoney(playerid, - 6);
                SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
SetPlayerHealth(playerid,30);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s pije LaVitu.", sendername);
ProxDetector(30.0, playerid, string, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
}
if(listitem == 3)
{
JB_GivePlayerMoney(playerid, - 7);
                SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
SetPlayerHealth(playerid,30);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s pije Fantu.", sendername);
ProxDetector(30.0, playerid, string, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
}
if(listitem == 4)
{
JB_GivePlayerMoney(playerid, - 8);
                SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
SetPlayerHealth(playerid,30);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s pije Pepsi.", sendername);
ProxDetector(30.0, playerid, string, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
}
if(listitem == 5)
{
JB_GivePlayerMoney(playerid, - 10);
                SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
SetPlayerHealth(playerid,30);
                GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s pije CocaColu.", sendername);
ProxDetector(30.0, playerid, string, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
}
}
return 1;
}


if(dialogid == 34)
{
if(response)
{
    if(listitem == 0)
{
JB_GivePlayerMoney(playerid, - 5);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
SetPlayerHealth(playerid,30);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s pije Lav Pivo.", sendername);
ProxDetector(30.0, playerid, string, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
}
if(listitem == 1)
{
JB_GivePlayerMoney(playerid, - 5);
                SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
SetPlayerHealth(playerid,30);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s pije Jelen Pivo.", sendername);
ProxDetector(30.0, playerid, string, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
}
if(listitem == 2)
{
JB_GivePlayerMoney(playerid, - 6);
                SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
SetPlayerHealth(playerid,30);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s pije Pinja Koladu.", sendername);
ProxDetector(30.0, playerid, string, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
}
if(listitem == 3)
{
JB_GivePlayerMoney(playerid, - 7);
                SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
SetPlayerHealth(playerid,30);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s pije Sangriju.", sendername);
ProxDetector(30.0, playerid, string, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
}
if(listitem == 4)
{
JB_GivePlayerMoney(playerid, - 8);
                SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
SetPlayerHealth(playerid,30);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s pije Pelinkovac.", sendername);
ProxDetector(30.0, playerid, string, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
}
if(listitem == 5)
{
JB_GivePlayerMoney(playerid, - 10);
                SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
SetPlayerHealth(playerid,30);
                GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s pije Vodku.", sendername);
ProxDetector(30.0, playerid, string, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
}
if(listitem == 6)
{
JB_GivePlayerMoney(playerid, - 10);
                SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
SetPlayerHealth(playerid,30);
                GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s pije Vinjak.", sendername);
ProxDetector(30.0, playerid, string, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
}
if(listitem == 7)
{
JB_GivePlayerMoney(playerid, - 10);
                SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
SetPlayerHealth(playerid,30);
                GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s pije Dzin.", sendername);
ProxDetector(30.0, playerid, string, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
}
if(listitem == 8)
{
JB_GivePlayerMoney(playerid, - 10);
                SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
SetPlayerHealth(playerid,30);
                GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s pije Martini.", sendername);
ProxDetector(30.0, playerid, string, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
}
if(listitem == 9)
{
JB_GivePlayerMoney(playerid, - 10);
                SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
SetPlayerHealth(playerid,30);
                GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s pije Tekilu.", sendername);
ProxDetector(30.0, playerid, string, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
}
if(listitem == 10)
{
JB_GivePlayerMoney(playerid, - 10);
                SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
SetPlayerHealth(playerid,30);
                GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s pije Vino.", sendername);
ProxDetector(30.0, playerid, string, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
}
if(listitem == 11)
{
JB_GivePlayerMoney(playerid, - 10);
                SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
SetPlayerHealth(playerid,30);
                GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s pije Rakiju.", sendername);
ProxDetector(30.0, playerid, string, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
}
}
return 1;
}


Eto nek se neko i posluzi kodom :D

black_dota

lol pa pise setplayerhealth(playerid, 30);
ako igrac ima 100 helta naravno da ce mu skinuti tj staviti ce mu na 30

SetPlayerHealth ti namjesta igracev health...

Znaci zapravo ide
NamjestiIgracuHeal(idigraca, health);

Ti moras prvo dobiti health od igraca, posto ima 4.5432, ovo sa tockom to ti je float i onda pises...


new Float:pheal; GetPlayerHealth(playerid, pheal);
//novo Float:pheal; UpisiTrenutniHealIgraca(idigraca, pheal);
// znaci zapisati ce ti trenutni heal, i onda ces u taj trenutni heal dodati 25 i heal ce ti se povecati za 25
SetPlayerHealth(playerid, pheal+25);
//zapravo cemo samo zbrojiti trenutni heal igraca sa 25 i namjestiti ga
// ako mu je heal npr 50 dodat ce mu 25 i staviti heal 75 :)


Jednostavno ? :)
Poslednja Izmena: Januar 30, 2011, 22:49:12 POSLE PODNE od BalcanNation
Kr0s3
is back...

[FilterScript] BizzSystem
[FilterScript] Dinamicno Rotiranje Objekata

[MAP] BalkanNation: BalkanTV

[Tutorial] VrsteVozila
[Tutorial] Razne boje sa starim bojama
[Tutorial] Radenje RPG moda "od 0"

Ukoliko trebate pomoc u skriptanju, neznate nesto napraviti ili neznate popraviti neki bug slobodno me PM...
Voljan sam pomoci svakome, jer kada sam ja ucio meni nitko nije...


Ukoliko nas podupires stavi na svoj profil,
skripta online uskoro



www.balkan-nation.com

Da, Hvala ti  :)

Respekt:
eXtreme
BloodMaster
Paradox

Citat: John_DillingthonEldin_Omanovic mi je ukrao auto.

Svjedok: Emir_Scofield.





@Dota odleprsaj iz ove teme!

Da nisi pomislio na to da je i Harisu to mozda trebalo pa se zahvalio ? I daj molim te ne pravi se toliko pametan .Ovde neki mogu tate da ti budu  :'(

@BalcanNation, Hvala :)