PickUp -
lsreskjn - 22.09.2013
Hey, i am not sure how to use dialog if player pickup a pickup so here is what i have done and please if you have time make it right, thanks
Код:
//////////////////////////Bankomat
Bankomat = CreatePickup(1212, 1, 1942.0297,-2361.3611,13.5469);
Код:
if(pickupid == Bankomat)
{
GetPlayerIp(playerid, ip2, sizeof(ip2));
ShowPlayerDialog(playerid, Bankomat, DIALOG_STYLE_LIST, "Cash Machine", "Account name: %s\nAccount number: %s\nBalance: $%d\n", "OK", "OK",Jmeno(playerid), GetPlayerIpEx(playerid), GetPlayerMoney(playerid));
return 1;
}
Re: PickUp -
DanishHaq - 22.09.2013
What's the problem? It looks fine to me. Make sure you have the last code under OnPlayerPickupPickup.
Re: PickUp -
lsreskjn - 22.09.2013
it is on public OnPlayerPickUpPickup(playerid, pickupid)
AW: PickUp -
Skimmer - 22.09.2013
First of all you cannot use
pickupid as
Dialog ID and second the GetPlayerIp function is useless there.
pawn Код:
// Top of the script
#define DIALOG_BANK (55) // The ID of the Dialog I choice 55, you're allowed to change it
if(pickupid == Bankomat)
{
ShowPlayerDialog(playerid, DIALOG_BANK, DIALOG_STYLE_LIST, "Cash Machine", "Account name: %s\nAccount number: %s\nBalance: $%d\n", "OK", "OK",Jmeno(playerid), GetPlayerIpEx(playerid), GetPlayerMoney(playerid));
return 1;
}
Re: PickUp -
lsreskjn - 22.09.2013
still the same errors
warning 202: number of arguments does not match definition
warning 202: number of arguments does not match definition
warning 202: number of arguments does not match definition
AW: PickUp -
Skimmer - 22.09.2013
Ah, and you cannot format a text inside a Dialog.
pawn Код:
new str[158];
format(str, sizeof(str), "Cash Machine", "Account name: %s\nAccount number: %s\nBalance: $%d\n", Jmeno(playerid), GetPlayerIpEx(playerid), GetPlayerMoney(playerid));
ShowPlayerDialog(playerid, DIALOG_BANK, DIALOG_STYLE_LIST, str, "OK", "");
Re: PickUp -
lsreskjn - 22.09.2013
This one is working for me now
Код:
if(pickupid == Bankomat)
{
new strin[400];
GetPlayerIp(playerid, ip2, sizeof(ip2));
GetPlayerPing(playerid);
format(strin,sizeof(strin),"{990099}===============Account Information===============\n\n",strin);
format(strin,sizeof(strin),"%s{FFFFFF}Account name: {990099}%s\n{FFFFFF}Account number: {990099}%s\n{FFFFFF}Balance: {990099}$%d\n",strin,Jmeno(playerid),GetPlayerIpEx(playerid),GetPlayerMoney(playerid));
ShowPlayerDialog(playerid,500,DIALOG_STYLE_MSGBOX,"INFO",strin,"Zavriet","");
return 1;
}