Help Me!! Dialog Input - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help Me!! Dialog Input (
/showthread.php?tid=619134)
DELETE -
TYDS - 14.10.2016
DELETE
Re: Help Me!! Dialog Input -
TYDS - 14.10.2016
any one ?
Re: Help Me!! Dialog Input -
TheDrx - 14.10.2016
Do you want to have only the Dialog for your "Enter the amount ..." message, or for all messages?
Re: Help Me!! Dialog Input -
TYDS - 14.10.2016
Quote:
Originally Posted by TheDrx
Do you want to have only the Dialog for your "Enter the amount ..." message, or for all messages?
|
trust enter the amount
Re: Help Me!! Dialog Input -
TYDS - 14.10.2016
i want to make a withdraw that type the amount you want withdraw in dialog input
Re: Help Me!! Dialog Input -
TYDS - 14.10.2016
any one
Re: Help Me!! Dialog Input -
ThatFag - 14.10.2016
here u go
dialog - edit name of dialog
Код:
if(dialogid == DIALOG_NAME && response == 1)
{
new amount = strval(inputtext);
if (amount > PlayerInfo[playerid][pAccount] || amount < 1)
{
SendClientMessageEx(playerid, COLOR_GRAD2, " You don't have that much!");
return 1;
}
if(gettime()-GetPVarInt(playerid, "LastTransaction") < 10) return SendClientMessageEx(playerid, COLOR_GRAD2, "You can only make a transaction once every 10 seconds, please wait!");
SetPVarInt(playerid, "LastTransaction", gettime());
GivePlayerCash(playerid,amount);
PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-amount;
format(string, sizeof(string), " You have withdrawn $%s from your account. Current balance: $%s ", number_format(amount), number_format(PlayerInfo[playerid][pAccount]));
SendClientMessageEx(playerid, COLOR_YELLOW, string);
OnPlayerStatsUpdate(playerid);
}
command withdraw
Код:
COMMAND:withdraw(playerid, params[])
{
if(!IsPlayerInRangeOfPoint(playerid, 15.0, 2308.7346, -11.0134, 26.7422))
{
SendClientMessageEx(playerid, COLOR_GREY, "You are not in a bank");
return 1;
}
if(PlayerInfo[playerid][pFreezeBank] == 1) return SendClientMessageEx(playerid, COLOR_GREY, "The Bank Is CLose Now");
}
not tested hope works.
DELETE -
TYDS - 14.10.2016
DELETE
Re: Help Me!! Dialog Input -
ThatFag - 14.10.2016
Do same thing like up.
but first show the first input dialog where player has to press the player's id
then check if the number that player has entered is existing playerid
if the id is correct show the other part of id where u can withdraw or idk what thats is .
PS im with phone