SA-MP Forums Archive
Put the classid in OnPlayerSpawn callback? - 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: Put the classid in OnPlayerSpawn callback? (/showthread.php?tid=73749)



Put the classid in OnPlayerSpawn callback? - TimBuk.Ekh - 17.04.2009

Hi
I want to use the classid variable in the OnPlayerSpawn
I tought to the global,but i don't know where to put it and how to attribute the classid variable to it
Can somebody help me?


Re: Put the classid in OnPlayerSpawn callback? - Rks25 - 17.04.2009

what do you want to do with the variable?
you can also make a custom function like OnPlayeridSpawn(playerid,classid); Which you call in OnPlayerSpawn


Re: Put the classid in OnPlayerSpawn callback? - TimBuk.Ekh - 17.04.2009

I want to give a weapon (the 10 ) to a special class,and i think it's the easier
I got that:
Код:
	if (!classid == 44)
	{
		SendClientMessage(playerid, 0xFFFFFFAA, "Good luck in this nucked world");
		GivePlayerWeapon(playerid, 8, 0);
		GivePlayerWeapon(playerid, 22, 100);
		GivePlayerWeapon(playerid, 25, 200);
		GivePlayerWeapon(playerid, 28, 800);
		GivePlayerWeapon(playerid, 33, 50);
		GivePlayerWeapon(playerid, 18, 7);
	};
	if (classid <= 42 && >= 37 )
	{
	  GivePlayerWeapon(playerid, 10, 0);
	};
There are surely lots of errors,i'm sorry


Re: Put the classid in OnPlayerSpawn callback? - Rks25 - 17.04.2009

you need to use GetPlayerSkin.

https://sampwiki.blast.hk/wiki/GetPlayerSkin


Re: Put the classid in OnPlayerSpawn callback? - TimBuk.Ekh - 17.04.2009

Thanks a lot,i didn't tought to that


Re: Put the classid in OnPlayerSpawn callback? - Rks25 - 17.04.2009

Your welcome.