18.03.2013, 22:50
hello
in game mode has a bag and current value like u got gold and u want to put it in the bag
so in game u do something and get gold , HasGold[playerid]
and
InBagGold[playerid]
so in deafult it add 1 value and if u got like 10 gold it will be anoying to every time to bring bag dialog to save golds in bag
so what i want is for example u got 8 gold when dialog input comeup and u enter number 8 and it will add all value (gold) in to bag
thanks
in game mode has a bag and current value like u got gold and u want to put it in the bag
so in game u do something and get gold , HasGold[playerid]
and
InBagGold[playerid]
so in deafult it add 1 value and if u got like 10 gold it will be anoying to every time to bring bag dialog to save golds in bag
Код:
if(listitem == 6) // gold { ShowPlayerDialog(playerid, PUTGOLD, DIALOG_STYLE_INPUT, "enter value of old ", "add number here", "Confirm", "Cancel"); return 1; }
Код:
if(dialogid == PUTGOLD) /// put gold { if(response) { new number; number = strval(HasGold[playerid]); if(number == 0) { SendClientMessage(playerid,COLOR_ERROR,"u havenyt gold "); return 1; } (HasGold[playerid]number --); // orginal code is HasGold[playerid] --; its dicrease ur value of gold (HasPackGold[playerid]number ++); // HasPackGold[playerid] ++; its only add one value of bag SendClientMessage(playerid,COLOR_LIGHTBLUE,"u put %d gold in ur bag",number); return 1; } }
thanks