Jobs on OnPlayerRequestClass +REP - 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: Jobs on OnPlayerRequestClass +REP (
/showthread.php?tid=499919)
Jobs on OnPlayerRequestClass +REP -
Tadas - 10.03.2014
Hello, How to do jobs select on OnPlayerRequestClass (I need a code)?
Re: Jobs on OnPlayerRequestClass +REP -
Tadas - 10.03.2014
UP UP
AW: Jobs on OnPlayerRequestClass +REP -
Macronix - 10.03.2014
Do you mean something like a text above the skin in the class selection which determines the role/job of this skin?
Re: AW: Jobs on OnPlayerRequestClass +REP -
Tadas - 10.03.2014
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.
AW: Jobs on OnPlayerRequestClass +REP -
Macronix - 10.03.2014
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
Re: Jobs on OnPlayerRequestClass +REP -
Tadas - 10.03.2014
Thank you, but can you show me example how add skin in OnGameModeInit ?
AW: Jobs on OnPlayerRequestClass +REP -
Macronix - 10.03.2014
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);
Re: Jobs on OnPlayerRequestClass +REP -
Tadas - 10.03.2014
Thank you

+REP