18.12.2012, 18:27
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
i hope you guys will be able to help me on that and understand it.
thanks
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;
thanks







