SA-MP Forums Archive
/class command help - 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: /class command help (/showthread.php?tid=578457)



/class command help - NeamPojma - 19.06.2015

Hey guys i need help how to make /class command.
I want to make when player type /class after death he will get textdraw.
It should work similar like f4 to redirect you to class selection (just to ShowPlayerTextdraw).
Something like if typed /class, OnPlayerDeath, PlayerTextDrawShow , how to make it?


Re: /class command help - NeamPojma - 20.06.2015

Bump


Re: /class command help - Banana_Ghost - 20.06.2015

PHP код:
//Under your command
ForceClassSelection(playerid);//This forces class selection, it won't actually happen until they begin to respawn.
public OnPlayerRequestClass(playerid,classid)
{
    
TextDrawShowForPlayer(playerid,TEXTDRAWID);//Show the textdraw at class selection.
    
return 1;
}
public 
OnPlayerRequestSpawn(playerid)
{
    
TextDrawHideForPlayer(playerid,TEXTDRAWID);//Hide the textdraw when they request to spawn from class selection.
    
return 1;

Replace TEXTDRAWID with your textdraw.


Re: /class command help - NeamPojma - 20.06.2015

Sorry i said class selection but i mean other one.(class which give you weapon)
Here is what i want :
http://i.imgur.com/VhL6z33.png
Here is my command:http://pastebin.com/zJHyu60N
How to make it show that textdraws onplayerspawn if /class is typed?