SA-MP Forums Archive
ShowPlayerDialog problem - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: ShowPlayerDialog problem (/showthread.php?tid=271305)



ShowPlayerDialog problem - [BLS]Touchdown - 23.07.2011

Hey guyz,

i got a problem:

the dialog i posted below will not be shown when i get into the pickup, but pawno compiles it correctly.

Код:
forward PickupChanger(playerid);
public PickupChanger(playerid)
{
	if(/*pickupid == changepick && */ShowAgain[playerid] == 1)
	{
	    new string[256];
	    if(PlayerInfo[playerid][pLevel] < 5) format(string, 256, "{FFFFFF}Hunter\t\t{FFFFFF}Level 1\n{FFFFFF}Guardian\t{FF0000}Level 5\n{FFFFFF}Assassin\t{FF0000}Level 7\n{FFFFFF}Sniper\t\t{FF0000}Level 10{FFFFFF}\nPriest\t{FFFF00}Level 12");
	    else if(PlayerInfo[playerid][pLevel] < 7) format(string, 256, "{FFFFFF}Hunter\t\t{FFFFFF}Level 1\n{FFFFFF}Guardian\t{FFFFFF}Level 5\n{FFFFFF}Assassin\t{FF0000}Level 7\n{FFFFFF}Sniper\t\t{FF0000}Level 10{FFFFFF}\nPriest\t{FFFF00}Level 12");
	    else if(PlayerInfo[playerid][pLevel] <10) format(string, 256, "Hunter\t\tLevel 1\nGuardian\tLevel 5\nAssassin\tLevel 7\nSniper\t\t{FF0000}Level 10{FFFFFF}\nPriest\t{FFFF00}Level 12");
	    else if(PlayerInfo[playerid][pLevel] <12) format(string, 256, "{FFFFFF}Hunter\t\tLevel 1\nGuardian\tLevel 5\nAssassin\tLevel 7\nSniper\t\tLevel 10\nPriest\t{FFFF00}Level 12");
	    ShowPlayerDialog(playerid, 2008, 2, "Class Changer", string, "Accept", "Cancel");
	    ShowAgain[playerid] = 0;
	}
	return 1;
}
anyone knows?

my OnPlayerPickupPickUp:

Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
	if(pickupid == changepick)
	{
	    PickupChanger(playerid);
	}
	else if(pickupid == shoppick)
	{
		PickupShop(playerid);
	}
	else if(pickupid == upgradepick)
	{
		PickupUpgrade(playerid);
	}
	else if(pickupid == armourpick)
	{
	    ArmourUpgrader(playerid);
	}
	return 1;
}



Re: ShowPlayerDialog problem - Cro_Haxor - 23.07.2011

Do You put it on OnPlayerPickUpPickup


AW: ShowPlayerDialog problem - [BLS]Touchdown - 23.07.2011

sure


Re: ShowPlayerDialog problem - iPLEOMAX - 23.07.2011

If everything else you have done is correct, then the problem is possibly here:

ShowPlayerDialog(playerid, 2008, 2, "Class Changer", string, "Accept", "Cancel");
Maybe it's interfering with other dialog ids.

Try this:

pawn Код:
// On top of your script:
#define DIALOG_CLASS_CHANGER 1245
//1245 or any random number

//In your code:
ShowPlayerDialog(playerid, DIALOG_CLASS_CHANGER , 2, "Class Changer", string, "Accept", "Cancel");

//In OnDialogResponse:
case DIALOG_CLASS_CHANGER: {
// Your things here..
}



AW: ShowPlayerDialog problem - [BLS]Touchdown - 24.07.2011

nope i got only 1 dialog with id 2008


Re: ShowPlayerDialog problem - MoroDan - 24.07.2011

The DialogID can be interfering and in Filterscripts, not only in gamemode.


Re: ShowPlayerDialog problem - MadeMan - 24.07.2011

Show your OnPlayerPickUpPickup.


AW: ShowPlayerDialog problem - [BLS]Touchdown - 24.07.2011

edited first post


Re: ShowPlayerDialog problem - MadeMan - 24.07.2011

Where do you set ShowAgain[playerid] ?


AW: ShowPlayerDialog problem - [BLS]Touchdown - 24.07.2011

Under OnPlayerSpawn, it will be set to 1.