SA-MP Forums Archive
team selecting 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: team selecting problem (/showthread.php?tid=252466)



team selecting problem - muhib777 - 01.05.2011

Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == 1)
		{
		if(response)
		{
			switch(listitem)
			{
				case 0:
				{
					SendClientMessage(playerid, 0x2641FEAA, "You have choosen the Team Rangers");
					SetPlayerTeam(playerid, 1);
					SetPlayerSkin(playerid, 287);
					SetPlayerPos(playerid, 191.82862854004,2074.44140625,22.644439697266); 
					GivePlayerWeapon(playerid, 30, 9999);
	   				GivePlayerWeapon(playerid, 4, 1);
	   				GivePlayerWeapon(playerid, 22, 9999);
	   				GivePlayerWeapon(playerid, 25, 9999);
	   				GivePlayerWeapon(playerid, 46, 9999);
	  				GivePlayerWeapon(playerid, 43, 9999);
	  				SetPlayerColor(playerid, 0x2641FEAA);
  				}
                case 1:
				{
					SendClientMessage(playerid, 0xFF0000FF, "You have choosen the Team Spetsnaz");
					SetPlayerTeam(playerid, 2); 
					SetPlayerSkin(playerid, 285);
					SetPlayerPos(playerid, 403.69519042969,2535.6623535156,16.54570007); 
					GivePlayerWeapon(playerid, 30, 9999);
	   				GivePlayerWeapon(playerid, 4, 1);
	   				GivePlayerWeapon(playerid, 22, 9999);
	   				GivePlayerWeapon(playerid, 25, 9999);
	   				GivePlayerWeapon(playerid, 46, 9999);
	  				GivePlayerWeapon(playerid, 43, 9999);
	  				SetPlayerColor(playerid, 0xFF0000FF);
				}
			}
		}
    	else if(!response) return SendClientMessage(playerid, -1, "You have to choose a team !") && ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST, "Choose a Team","Rangers\nSpetsnaz","Choose","Exit");
	}
	return 0;
}

public OnPlayerRequestSpawn(playerid)
{
	ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST, "Choose a Team","Rangers\nSpetsnaz","Choose","Exit");
	return 1;
}
These are the errors im getting

(218 ) : warning 235: public function lacks forward declaration (symbol "OnDialogResponse")
(256 ) : error 017: undefined symbol "ShowPlayerDialog"
(263 ) : error 017: undefined symbol "ShowPlayerDialog"

how do i fix this


Re: team selecting problem - Ash. - 01.05.2011

Okay, this may sound weird but do you include a_samp in your script?
pawn Code:
#include <a_samp> //Should be at the top



Re: team selecting problem - muhib777 - 01.05.2011

yeh i already had it :P


Re: team selecting problem - MadeMan - 01.05.2011

Download latest includes

http://www.sa-mp.com/download.php