17.01.2013, 22:00
Try this.
PHP Code:
if(dialogid == DIALOG_DEPOSIT)
{
if(!response) return 1;
if(response)
{
if(!strval(inputtext))
{
SendClientMessage(playerid, GREY, "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(str, sizeof(str), "You have successfully deposit %d in your locker.", strval(inputtext));
SendClientMessage(playerid, GREY, str);
PlayerStat[playerid][LockerMoney] += strval(inputtext);
GiveMoney(playerid, -strval(inputtext));
format(str, sizeof(str), "* %s opens their locker and puts %d in it.", GetICName(playerid), strval(inputtext));
SendNearByMessage(playerid, ACTION_COLOR, str, 5);
}
else
{
SendClientMessage(playerid, GREY, "You don't have that much.");
}
}
}
}