11.06.2010, 17:54
Code:
if(dialogid == 22 && response) { new cashdeposit = strval(inputtext[]); new droppername[MAX_PLAYER_NAME]; GetPlayerName(playerid, droppername, sizeof(droppername)); if(cashdeposit <= 0) { return 1; } if(cashdeposit > PlayerInfo[playerid][pPot]) { ShowPlayerDialog(playerid, 9999, DIALOG_STYLE_MSGBOX, "House Safes by:Qeux", "You Don't have that much Pot with you", "Done", "Close"); return 1; } PlayerInfo[playerid][pPot] -= cashdeposit; PlayerInfo[playerid][pSafePot] += cashdeposit; format(string, sizeof(string), "%s places some drugs in a safe.", droppername); ShowPlayerDialog(playerid, 9999, DIALOG_STYLE_MSGBOX, "House Safes by:Qeux", string, "Done", "Close"); ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); printf("%s", string); return 1; }
Code:
new cashdeposit = strval(inputtext[]);