SA-MP Forums Archive
OnPlayerRequestClass. - 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)
+--- Thread: OnPlayerRequestClass. (/showthread.php?tid=281955)



OnPlayerRequestClass. - Shetch - 08.09.2011

Hello scripters.
Basicly i want to make it so my character holds a bat in he's hands, and does an animation.
I used this, but for some reason the weapon doesn't show up in its hands:
Код:
PlayerClass[playerid] = classid;
	switch (classid) {
	case 0:{
	GameTextForPlayer(playerid, "~w~~<~Mad Dog~>~", 1000, 3);
	GivePlayerWeapon(playerid, 5, 1);
	ApplyAnimation(playerid,"BASEBALL","Bat_1",4.1,1,1,1,1,1,1);
	SetPlayerColor(playerid, WHITE);
	}
}



Re: OnPlayerRequestClass. - AeroBlast - 08.09.2011

I dont think GivePlayerWeapon works in OnPlayerRequestSpawn.
You could try to make the player hold an object