SA-MP Forums Archive
How to make players see textdraw before choosing class? - 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: How to make players see textdraw before choosing class? (/showthread.php?tid=149061)



How to make players see textdraw before choosing class? - GamerZPro - 20.05.2010

Hi, How do i make player read some rules but make them wait a specific time before choosing their class?


Re: How to make players see textdraw before choosing class? - Jochemd - 20.05.2010

Use OnPlayerConnect


Re: How to make players see textdraw before choosing class? - GamerZPro - 20.05.2010

Quote:
Originally Posted by Jochemd
Use OnPlayerConnect
I tried that it works but i want players to wait for like 10 second before showing them the class selection.


Re: How to make players see textdraw before choosing class? - 0ne - 20.05.2010

Return 0; on playerconnect show them textdraws and settimerex to 10seconds for hiding textdraws, on the public of hiding the textdraws put on the end:

Код:
new classid;
OnPlayerRequestClass(playerid, classid);



Re: How to make players see textdraw before choosing class? - GamerZPro - 20.05.2010

Quote:
Originally Posted by 0ne
Return 0; on playerconnect show them textdraws and settimerex to 10seconds for hiding textdraws, on the public of hiding the textdraws put on the end:

Код:
new classid;
OnPlayerRequestClass(playerid, classid);
Thanks but still the same, it always go to the class selection.

Here the code:
Код:
public OnPlayerConnect(playerid)
{	
  PreloadAnimLib(playerid,"BOMBER");
  	PreloadAnimLib(playerid,"RAPPING");
  	PreloadAnimLib(playerid,"SHOP");
  	PreloadAnimLib(playerid,"BEACH");
  	PreloadAnimLib(playerid,"SMOKING");
  	PreloadAnimLib(playerid,"FOOD");
  	PreloadAnimLib(playerid,"ON_LOOKERS");
  	PreloadAnimLib(playerid,"DEALER");
	PreloadAnimLib(playerid,"CRACK");
	PreloadAnimLib(playerid,"CARRY");
	PreloadAnimLib(playerid,"COP_AMBIENT");
	PreloadAnimLib(playerid,"PARK");
	PreloadAnimLib(playerid,"INT_HOUSE");
	PreloadAnimLib(playerid,"FOOD");
	PreloadAnimLib(playerid,"PED");
	PlayerInfo[playerid][SpawnDance] = true;
  ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1); 
  SetTimerEx("ShowWelcome",0,false,"i",playerid);
	SetTimerEx("HideWelcome",15000,false,"i",playerid);
	return 0;
}
Код:
public HideWelcome(playerid)
{
	TextDrawHideForPlayer(playerid, Textdraw6);
	TextDrawHideForPlayer(playerid, Textdraw7);
	TextDrawHideForPlayer(playerid, Textdraw8);
	TextDrawHideForPlayer(playerid, Textdraw9);
	TextDrawHideForPlayer(playerid, Textdraw10);
	TextDrawHideForPlayer(playerid, Textdraw11);
	TextDrawHideForPlayer(playerid, Textdraw12);
	TextDrawHideForPlayer(playerid, Textdraw13);
	TextDrawHideForPlayer(playerid, Textdraw14);
	TextDrawHideForPlayer(playerid, Textdraw15);
	TextDrawHideForPlayer(playerid, Textdraw16);
	TextDrawHideForPlayer(playerid, Textdraw17);
	TextDrawHideForPlayer(playerid, Textdraw18);
	TextDrawHideForPlayer(playerid, Textdraw19);
	new classid;
  OnPlayerRequestClass(playerid, classid);
	return 1;
}