Restrict Class
#1

So I'm running a small TDM server and I'm wanting to restrict a class to admin only, then one for donators/vips. Can someone tell me how I would go about doing this? Thanks.
Reply
#2

https://sampwiki.blast.hk/wiki/OnPlayerRequestClass

You can detect which class is being requested, if the class is something you wish to restrict, you can simply place a conditional block of code to deny them from getting the skin if they don't meet the requisites.

For example (wiki page):

pawn Код:
public OnPlayerRequestClass(playerid,classid)
{
  if(classid == 3 && !IsPlayerAdmin(playerid))
  {
    SendClientMessage(playerid,COLOR_GREEN,"This skin is only for admins!");
  }
  return 1;
}
Only RCON administrators can use class 3.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)