DialogBox 'inputtext' - 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: DialogBox 'inputtext' (
/showthread.php?tid=151823)
DialogBox 'inputtext' -
Antonio [G-RP] - 01.06.2010
Is there a way you can find out if 'inputtext' is bigger or smaller that a players cash (say PlayerInfo[playerid][pCash] represented players cash)
Re: DialogBox 'inputtext' -
[HiC]TheKiller - 01.06.2010
pawn Код:
if(strval(inputtext) > PlayerInfo[playerid][pCash]) //The player is a poor mofo lol
That was easy wasn't it?
Re: DialogBox 'inputtext' -
Antonio [G-RP] - 01.06.2010
Ah i was missing (strval) , thanks man
Re: DialogBox 'inputtext' -
Antonio [G-RP] - 01.06.2010
LOL major fail in my code..
pawn Код:
if(dialogid==6)
{
if(!response)return 0;
if(strval(inputtext) > PlayerInfo[playerid][pCash]) {
SendClientMessage(playerid, COLOR_RED, "You cannot depost more money that you atcually have!");
}
PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash] - (strval)inputtext;
AntiHack(playerid, -(strval)inputtext);
PlayerInfo[playerid][pAccount] = PlayerInfo[playerid][pAccount] + (strval)inputtext;
}
Re: DialogBox 'inputtext' -
Antonio [G-RP] - 01.06.2010
bumpkins
Re: DialogBox 'inputtext' -
Calgon - 01.06.2010
Quote:
Originally Posted by Antonio (eternalrp.webatu.com)
LOL major fail in my code..
pawn Код:
if(dialogid==6) { if(!response)return 0; if(strval(inputtext) > PlayerInfo[playerid][pCash]) { SendClientMessage(playerid, COLOR_RED, "You cannot depost more money that you atcually have!"); } PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash] - (strval)inputtext; AntiHack(playerid, -(strval)inputtext); PlayerInfo[playerid][pAccount] = PlayerInfo[playerid][pAccount] + (strval)inputtext; }
|
Are you a complete retard?
not
Furthermore, you're allowed to bump every 12 hours, not every 12 minutes. Follow the forum rules.
Re: DialogBox 'inputtext' -
Antonio [G-RP] - 01.06.2010
Thanks for the help.
Furthermore, I don't care for the rules. ( Kidding )
Re: DialogBox 'inputtext' -
Antonio [G-RP] - 01.06.2010
Fuck, kay, I fixed it but now I have a new problem.
When I enter any number, It takes the money from me and instantly closes the dialog box. Help please?
pawn Код:
if(dialogid==6)
{
if(!response)return 0;
if(strval(inputtext) > PlayerInfo[playerid][pCash]) {
SendClientMessage(playerid, COLOR_RED, "You cannot deposit more money that you atcually have!");
}
PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash] - strval(inputtext);
AntiHack(playerid, -strval(inputtext));
PlayerInfo[playerid][pAccount] = PlayerInfo[playerid][pAccount] + strval(inputtext);
}
Re: DialogBox 'inputtext' -
ettans - 01.06.2010
Then re-open the dialog after doing your stuff.
Re: DialogBox 'inputtext' -
Antonio [G-RP] - 01.06.2010
It closes as I put the first number in, Ive done something wrong