26.07.2014, 15:25
When i use any fs related to dialogue its does not works. Cause in my game mod there is one system BIZ withdraw cause in that only numeric data has to be insterted when i use any characters data it give this
My BIZ WITHDRAW code
Pls add something into it when can allow both Charaters and numeric please i really need help
Код:
Characters detected, numbers only.
Код:
if(dialogid == BIZ_WITHDRAW_DIALOG) { if(response) if(!IsNumeric(inputtext)) return SendClientMessage(playerid, RED, "Characters detected, numbers only."); if(!strlen(inputtext)) return SendClientMessage(playerid, RED, "You must submit an amount to withdraw."); if(strval(inputtext) > BizInfo[BizID[playerid]][bEarnings]) return SendClientMessage(playerid, RED, "Insufficient funds."); if(strval(inputtext) > 10000000) return SendClientMessage(playerid, RED, "You can only withdraw $10M at a time"); BizInfo[BizID[playerid]][bEarnings] = BizInfo[BizID[playerid]][bEarnings] - strval(inputtext); GivePlayerCash(playerid, strval(inputtext)); format(fstr, sizeof(fstr), "You have withdrawn $%d from your business earnings.", strval(inputtext)); SendClientMessage(playerid, WHITE, fstr); new file[40]; format(file, sizeof(file), BIZ_FILE, BizID[playerid]); new INI:bFilee = INI_Open(file); INI_WriteInt(bFilee, "bEarnings", BizInfo[BizID[playerid]][bEarnings]); INI_Close(bFilee); }