Jobs on OnPlayerRequestClass +REP
#1

Hello, How to do jobs select on OnPlayerRequestClass (I need a code)?
Reply
#2

UP UP
Reply
#3

Do you mean something like a text above the skin in the class selection which determines the role/job of this skin?
Reply
#4

Quote:
Originally Posted by Macronix
Посмотреть сообщение
Do you mean something like a text above the skin in the class selection which determines the role/job of this skin?
Yes.
Reply
#5

Then try something like this:
Код:
	//Above main():
	#define JOB_GANGSTER  	1
	#define JOB_FARMER  	2
	//...
	new PlayerJob[MAX_PLAYERS]; //Player team variable
	
	//In RequestClass:
	switch(classid)
	{
	    case 0:
	    {
			GameTextForPlayer(playerid, "Gangmember (Job: Gangster)", 2000, 4);
			PlayerJob[playerid] = JOB_GANGSTER;
	    }
	    case 1:
	    {
			GameTextForPlayer(playerid, "Farmer (Job: Farmer)", 2000, 4);
			PlayerJob[playerid] = JOB_FARMER;
	    }
	}
"classid" defines the skin from OnGameModeInit's AddPlayerClass
Reply
#6

Thank you, but can you show me example how add skin in OnGameModeInit ?
Reply
#7

With this code:
Код:
//skin, Float:x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo

AddPlayerClass(0, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0);
AddPlayerClass(1, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0);
Reply
#8

Thank you +REP
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)