OnPlayerChooseClass? - 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: OnPlayerChooseClass? (
/showthread.php?tid=408289)
OnPlayerChooseClass? -
Sellize - 17.01.2013
Hey is there something that will perform an action when the player selects a specific class?
(example: you choose cop, you get the blue nametag)
Re: OnPlayerChooseClass? -
mineralo - 17.01.2013
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
switch(classid)
{
case 265:SetPlayerColor(playerid,COLOR_BLUE);
}
return 1;
}
Re: OnPlayerChooseClass? -
Sellize - 17.01.2013
Quote:
Originally Posted by mineralo
pawn Код:
public OnPlayerRequestClass(playerid, classid) { switch(classid) { case 265:SetPlayerColor(playerid,COLOR_BLUE); } return 1; }
|
But how do i know which class he has selected
Re: OnPlayerChooseClass? -
dr.lozer - 17.01.2013
classid
Re: OnPlayerChooseClass? -
azzerking - 17.01.2013
Class id is the ID of the skin, like when you use:
AddPlayerClass(281,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
Where 281 is thats the classid
so when it's like this
pawn Код:
switch(classid) // Switches between classes
{
case 265:SetPlayerColor(playerid,COLOR_BLUE); // Case 265 // 265 being the class id
}