SA-MP Forums Archive
Dialogs 2in1 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: Dialogs 2in1 problem (/showthread.php?tid=263119)



Dialogs 2in1 problem - Gintas - 20.06.2011

Hi, my problem is i have made 3diffrent dialogs.
1: To choose Male or Female. (Male = Vyras; Female= Moteris)
2: To buy skins for female.
3: To buy skins for male.

When i enter on 1st dialog it works ok. When i enter 2nd or 3rd dialogs they
work well. BUT when i choose 1st or 2nd skin choise (on 2nd or 3rd dialog) my skin doesnt change.
And i get a message
Код:
Tavo lytis: Vyras
(if i pushed on 1st skin) AND
Код:
Tavo lytis: Moteris
(if i pushed on 2nd skin)
If i chose any other of choises it works ok.
Here's the code.

Код:
		if(dialogid == 1)
	{
    	if(!response) return SendClientMessage(playerid, 0xFF0000FF, "You canceled!");
		}
    	if(listitem == 0)
		{
		SetPVarInt( playerid, "Lytis", 1 );
    	SendClientMessage(playerid,0xFFFFFFFF,"Tavo lytis: Vyras");
    	return 1;
		}
    	if(listitem == 1 )
		{
		SetPVarInt( playerid, "Lytis", 2 );
    	SendClientMessage(playerid,0xFFFFFFFF,"Tavo lytis: Moteris");
  		return 1;
	}
	if (dialogid==2 && response==1)
   		{
    	switch(listitem)
	 	{
    	    case 0:
    	    {
	        	SetPlayerSkin(playerid,13);
	        	GivePlayerMoney(playerid,-1000);
				SendClientMessage(playerid,0xFF9900AA,"« You have bought this dress for $1000 »");
    	    }
    	    case 1:
    	    {
	        	SetPlayerSkin(playerid,40);
	        	GivePlayerMoney(playerid,-1150);
				SendClientMessage(playerid,0xFF9900AA,"« You have bought this dress for $1150 »");
    	    }
    	    case 2:
    	    {
	        	SetPlayerSkin(playerid,91);
				GivePlayerMoney(playerid,-1000);
				SendClientMessage(playerid,0xFF9900AA,"« You have bought this dress for $1000 »");
    	    }
    	    case 3:
    	    {
	        	SetPlayerSkin(playerid,141);
				GivePlayerMoney(playerid,-1000);
				SendClientMessage(playerid,0xFF9900AA,"« You have bought this dress for $1000 »");
    	    }
    	    case 4:
    	    {
	        	SetPlayerSkin(playerid,190);
				GivePlayerMoney(playerid,-1150);
				SendClientMessage(playerid,0xFF9900AA,"« You have bought this dress for $1150 »");
    	    }
    	    case 5:
    	    {
	        	SetPlayerSkin(playerid,207);
				GivePlayerMoney(playerid,-1050);
				SendClientMessage(playerid,0xFF9900AA,"« You have bought this dress for $1050 »");
    	    }
    	    case 6:
    	    {
	        	SetPlayerSkin(playerid,214);
				GivePlayerMoney(playerid,-1150);
				SendClientMessage(playerid,0xFF9900AA,"« You have bought this dress for $1150 »");
    	    }
    	    case 7:
    	    {
	        	SetPlayerSkin(playerid,219);
				GivePlayerMoney(playerid,-1000);
				SendClientMessage(playerid,0xFF9900AA,"« You have bought this dress for $1000 »");
    	    }
		}
	}
	if (dialogid==3 && response==1)
   	{
    	switch(listitem)
	 	{
    	    case 0:
    	    {
	        	SetPlayerSkin(playerid,262);
	        	GivePlayerMoney(playerid,-1000);
				SendClientMessage(playerid,0xFF9900AA,"« You have bought this dress for $1000 »");


    	    }
    	    case 1:
    	    {
	        	SetPlayerSkin(playerid,258);
	        	GivePlayerMoney(playerid,-1150);
				SendClientMessage(playerid,0xFF9900AA,"« You have bought this dress for $1150 »");


    	    }
    	    case 2:
    	    {
	        	SetPlayerSkin(playerid,240);
				GivePlayerMoney(playerid,-1000);
				SendClientMessage(playerid,0xFF9900AA,"« You have bought this dress for $1000 »");
    	    }
    	    case 3:
    	    {
	        	SetPlayerSkin(playerid,217);
				GivePlayerMoney(playerid,-1050);
				SendClientMessage(playerid,0xFF9900AA,"« You have bought this dress for $1050 »");
    	    }
    	    case 4:
    	    {
	        	SetPlayerSkin(playerid,158);
				GivePlayerMoney(playerid,-1000);
				SendClientMessage(playerid,0xFF9900AA,"« You have bought this dress for $1000 »");
    	    }
    	    case 5:
    	    {
	        	SetPlayerSkin(playerid,101);
				GivePlayerMoney(playerid,-1050);
				SendClientMessage(playerid,0xFF9900AA,"« You have bought this dress for $1050 »");
    	    }
    	    case 6:
    	    {
	        	SetPlayerSkin(playerid,98);
				GivePlayerMoney(playerid,-1150);
				SendClientMessage(playerid,0xFF9900AA,"« You have bought this dress for $1150 »");
    	    }
    	    case 7:
    	    {
	        	SetPlayerSkin(playerid,72);
				GivePlayerMoney(playerid,-1050);
				SendClientMessage(playerid,0xFF9900AA,"« You have bought this dress for $1050 »");
    	    }
		}
	}



Re: Dialogs 2in1 problem - =WoR=Varth - 20.06.2011

Is that in your register system?
You can only set player's skin if they already spawned. Or you can do SetSpawnInfo.


Re: Dialogs 2in1 problem - Gintas - 21.06.2011

No its when player picks up a pickup. (3diffrent pickups for every dialog)