Class for players - 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 for players (
/showthread.php?tid=377158)
Class for players -
trapstar2020 - 13.09.2012
You know how people block skins from players, well instead of the skin i want to block a player from a class when he trys to spawns any hows?
Re: Class for players -
Deal-or-die - 13.09.2012
And this class being what? I am assuming the server being a deathmatch server and you don't want players choosing a particular class?
How do you select a particular class?
- do you get shown a menu on login or so you have to type a command, or even press a key?
Re: Class for players -
trapstar2020 - 13.09.2012
no i mean like okay log tut and
Код:
onplayerspawnrequest(blah)
i want to be able to block player from spawning if he does have access to the classid
like if the player
if(PlayerInfo[playerid][pwhatever] == 1)
he cannot access the class
i just want the player not do able to access lets say classid 4
AddPlayerClass(blah blah blah) u know the rest 4 it
Re: Class for players -
Deal-or-die - 13.09.2012
Alright you could try doing something like this.
Example:
pawn Код:
public OnPlayerRequestClass(playerid,classid)
{
if(classid == 3 && PlayerInfo[playerid][pwhatever] == 1)
{
SendClientMessage(playerid,COLOR_GREEN,"This class is unavailable to you.");
return 0;
}
return 1;
}
Also have a look at this, it may help
https://sampwiki.blast.hk/wiki/OnPlayerRequestClass