Class for players
#1

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?
Reply
#2

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?
Reply
#3

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
Reply
#4

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)