Put the classid in OnPlayerSpawn callback?
#1

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?
Reply
#2

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
Reply
#3

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
Reply
#4

you need to use GetPlayerSkin.

https://sampwiki.blast.hk/wiki/GetPlayerSkin
Reply
#5

Thanks a lot,i didn't tought to that
Reply
#6

Your welcome.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)