[HELP] dialog
#1

hello.

im a beginner in scripting for sa-mp.
the PM thingy work fine.
now , i want to give clicked player the money amount i type in the box.

little explaination : GivePlayerMoney(clickeduser, x_amountofmoney);


here my curent code
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_CLICK)
 	  {
		if(!response)  return SendClientMessage(playerid,RED,"You didn't selected any option.");
		if(response)
		{
            ShowPlayerDialog(playerid, 2001, DIALOG_STYLE_INPUT, "PM", "Enter the message to send ", "Ok", "Quit");
            ShowPlayerDialog(playerid, 2002, DIALOG_STYLE_INPUT, "SENDMONEY", "Ammount", "Ok", "Quit");
        	}
    	return 1;
	    }
     if(dialogid == 2001)
               {
                 if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "Player OFFLINE!");
                 if(strlen(inputtext) > 0)
                 {
                 GetPlayerName(playerid, Nome, sizeof(Nome));
                 GetPlayerName(playerid, ClickedPlayer, sizeof(ClickedPlayer));
                 format(StringaPM, sizeof(StringaPM), " PM received from: %s(%d): %s ", ClickedPlayer, playerid, inputtext);
	             SendClientMessage(playerid,GREEN, StringaPM);
	             format(StringaPM, sizeof(StringaPM), "(( PM sent to: %s(%d): %s ))", Nome, playerid, inputtext);
    			 SendClientMessage(playerid,YELLOW, StringaPM);
                 }
                 }

     if(dialogid == 2002)
               {
                 if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "Player OFFLINE!");
                 if(strlen(inputtext) > 0)
                 {
				 // GIVE ENTERED MONEY AMOUNT TO THE "CLICKED" PLAYER
                 }
                 }
	return 0;
i hope you guys will be able to help me on that and understand it.

thanks
Reply


Messages In This Thread
[HELP] dialog - by NvidiaForTheWin - 18.12.2012, 18:27
Re: [HELP] dialog - by LetsOWN[PL] - 18.12.2012, 18:39
Re : [HELP] dialog - by NvidiaForTheWin - 18.12.2012, 18:50
Re: [HELP] dialog - by LetsOWN[PL] - 18.12.2012, 18:52
Re : [HELP] dialog - by NvidiaForTheWin - 18.12.2012, 19:03
Re: [HELP] dialog - by LetsOWN[PL] - 18.12.2012, 19:04
Re : [HELP] dialog - by NvidiaForTheWin - 18.12.2012, 19:16
Re: [HELP] dialog - by LetsOWN[PL] - 18.12.2012, 19:19
Re : Re: [HELP] dialog - by NvidiaForTheWin - 18.12.2012, 19:24
Re: [HELP] dialog - by LetsOWN[PL] - 18.12.2012, 19:27

Forum Jump:


Users browsing this thread: 1 Guest(s)