SA-MP Forums Archive
Dance Bug.. - 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: Dance Bug.. (/showthread.php?tid=137073)



Dance Bug.. - benlevi - 27.03.2010

I did in my server when I in Class Selection I use Dance Anim..
But when i spwan it's doesn't stop.

Code:

Код:
	SetPlayerInterior(playerid,3);
	SetPlayerPos(playerid,-2670.9954,1410.3400,912.7240);
	SetPlayerFacingAngle(playerid, 272.0975);
	SetPlayerCameraPos(playerid,-2665.0789,1410.6978,912.7240);
	SetPlayerCameraLookAt(playerid,-2670.9954,1410.3400,912.7240);
	SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
OnPlayerSpawnCode:


Код:
public OnPlayerSpawn(playerid)
{
	ResetPlayerStats(playerid);
	
	if(Logged[playerid] == 0) return Kick(playerid);
		if(!gPlayerAnimLibsPreloaded[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");
		gPlayerAnimLibsPreloaded[playerid] = 1;
	}
			StopLoopingAnim(playerid);
    TextDrawHideForPlayer(playerid,txtAnimHelper);
	 ClearAnimations(playerid);
	SetRandomSpawnForPlayer(playerid);
	GivePlayerMoney(playerid, 200);
	return 1;
}
Why I Keep Dancing? Just when i click "f" it's stop.


Re: Dance Bug.. - Norck - 27.03.2010

Try to put
Код:
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_NONE);
At your OnPlayerSpawn


Re: Dance Bug.. - benlevi - 27.03.2010

Thanks :P
It's work.