Strval(inputtext) -- Need help.
#10

Quote:
Originally Posted by Chenko
View Post
Try this.


PHP Code:
if(dialogid == DIALOG_DEPOSIT)
    {
        if(!
response) return 1;
        if(
response)
        {
            if(!
strval(inputtext))
            {
                
SendClientMessage(playeridGREY"You have entered an Invalid amount of money.");
            }
            else
            {
                if(
strval(inputtext) < 0)
                    return 
SendClientMessage(playerid, -1"You can't deposit a negative amount."); 
                
                if(
PlayerStat[playerid][Money] >= strval(inputtext))
                {
                       new 
str[128];
                       
format(strsizeof(str), "You have successfully deposit %d in your locker."strval(inputtext));
                       
SendClientMessage(playeridGREYstr);
                       
PlayerStat[playerid][LockerMoney] += strval(inputtext);
                       
GiveMoney(playerid, -strval(inputtext));
                       
format(strsizeof(str), "* %s opens their locker and puts %d in it."GetICName(playerid), strval(inputtext));
                       
SendNearByMessage(playeridACTION_COLORstr5);
                }
                else
                {
                    
SendClientMessage(playeridGREY"You don't have that much.");
                }
            }
        }
    } 
Hey! It works fine! Thank you! Rep++
Reply


Messages In This Thread
Strval(inputtext) -- Need help. - by Bobman - 17.01.2013, 17:04
Re: Strval(inputtext) -- Need help. - by mineralo - 17.01.2013, 17:51
Re: Strval(inputtext) -- Need help. - by Bobman - 17.01.2013, 18:46
Re: Strval(inputtext) -- Need help. - by RedCrossER - 17.01.2013, 18:51
Re: Strval(inputtext) -- Need help. - by Bobman - 17.01.2013, 18:55
Re: Strval(inputtext) -- Need help. - by azzerking - 17.01.2013, 18:58
Re: Strval(inputtext) -- Need help. - by Bobman - 17.01.2013, 19:02
Re: Strval(inputtext) -- Need help. - by Sasino97 - 17.01.2013, 20:15
Re: Strval(inputtext) -- Need help. - by Chenko - 17.01.2013, 22:00
Re: Strval(inputtext) -- Need help. - by Bobman - 18.01.2013, 10:45

Forum Jump:


Users browsing this thread: 5 Guest(s)