Need Help with Dialogresponse - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need Help with Dialogresponse (
/showthread.php?tid=118927)
Need Help with Dialogresponse -
Shinoda90 - 05.01.2010
Hello,
I want write a banksystem with Dialog.
I try it, but it doesnt work.
Please Help Me. How can I write this
THANKS!!!
Error:
C:\Users\Shinoda\Desktop\samp03asvr_R4_win32\gamem odes\gf.pwn(962
: error 033: array must be indexed (variable "kontotemp")
C:\Users\Shinoda\Desktop\samp03asvr_R4_win32\gamem odes\gf.pwn(9634) : error 033: array must be indexed (variable "kontotemp")
C:\Users\Shinoda\Desktop\samp03asvr_R4_win32\gamem odes\gf.pwn(9635) : error 035: argument type mismatch (argument 2)
CODE:
--------------
ShowPlayerDialog(playerid,301,DIALOG_STYLE_INPUT," Deposit","How much money do you want to deposit?","Yes", "No");
--------------
if(dialogid == 301)
{
new targetid;
new cash2 = GetPlayerMoney(targetid);
new kontotemp[128];
if(strlen(inputtext))
{
strmid(kontotemp, inputtext, 0, strlen(inputtext), 12
;
if(cash2 < kontotemp)
{
SendClientMessage(playerid, COLOR_YELLOW, "You do not have enough money.");
}
else
{
PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]+kontotemp;
GivePlayerMoney(playerid, -kontotemp);
}
}
}
Re: Need Help with Dialogresponse -
LarzI - 05.01.2010
pawn Код:
if(dialogid == 301)
{
new targetid;
new cash2 = GetPlayerMoney(targetid);
new kontotemp[128];
if(strlen(inputtext))
{
strmid(kontotemp, inputtext, 0, strlen(inputtext), 128);
if(cash2 < strval(kontotemp))
{
SendClientMessage(playerid, COLOR_YELLOW, "You do not have enough money.");
}
else
{
PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]+strval(kontotemp);
GivePlayerMoney(playerid, -strval(kontotemp));
}
}
}
Try that
Re: Need Help with Dialogresponse -
Shinoda90 - 05.01.2010
It works!
Thanks