SA-MP Forums Archive
Dialog Spam - Printable Version

+- SA-MP Forums Archive (
+-- Forum: SA-MP Scripting and Plugins (
+--- Forum: Scripting Help (
+--- Thread: Dialog Spam (/showthread.php?tid=607900)

Dialog Spam - CloudLEL - 25.05.2016


I was wondering if someone could shed some light on something for me.

Each house I create has a pickup assigned to them on creation, and on load. Each pickup on entered should open up a dialog.

So far, I've got it to get the house ID when they enter it. However, the dialog is being opened every few seconds, it's as if the loop is repeat, but I've broken out the loop.

I'm most likely doing something stupid and haven't noticed it.


public OnPlayerPickUpDynamicPickup(playerid, STREAMER_TAG_PICKUP pickupid)
	new Float: x, Float: y, Float: z, i;
	GetPlayerPos(playerid, x, y, z);
	for(i = 1; i < MAX_HOUSES; i++)
		if(IsPlayerInRangeOfPoint(playerid, 1.0, x, y, z))
			if(pickupid == hInfo[i][Pickup])
				format(szString, sizeof(szString), "For Sale: %s", hInfo[i][Name]);
				ShowPlayerDialog(playerid, DIALOG_HOUSE, DIALOG_STYLE_LIST, szString, "Information\nPurchase", "Next", "Close");
	return 1;

Re: Dialog Spam - Stinged - 25.05.2016

You should use type 2 when you create your pickup, or else the callback will keep getting called when you're standing there.