Hi, I need a command that will make player receive ammount of money he types in the dialog.
pawn Код:
#define DIALOG_MONEY 1//Change the value after 'DIALOG_MONEY' to any dialog ID that is not currently in useCMD:money
(playerid, params
[]){ ShowPlayerDialog
(playerid, DIALOG_MONEY, DIALOG_STYLE_INPUT,
"Money",
"Enter the amount of money you want",
"Confirm",
"Cancel");
return 1;
} //Command created with 'ZCMD'. https://sampforum.blast.hk/showthread.php?tid=91354public OnDialogResponse
(playerid, dialogid, response, listitem, inputtext
[]){ if(dialogid
== DIALOG_MONEY
) { if(response
) { new var
= strval(inputtext
);
if((GetPlayerMoney
(playerid
) + var
) > 99999999) return SendClientMessage
(playerid, 0xFF0000FF,
"You can't have that much money, you greedy pig.");
//Not necessary, but it makes sense. GivePlayerMoney
(playerid, var
);
SendClientMessage
(playerid, 0xFFFF00FF,
"Money Received.");
return 1;
} } return 0;
}