Converting RCON admin to pAdmin? -
Bahooki - 29.08.2013
Hey, I'm currently working on a little server of mine, and I have a quite straightforward question. Currently I'm using an admin FS, and I want to set it up so my property FS works through it. For example, I have AVS setup, and I had to convert that from RCON admin to pAdmin with no problems at all. However, when I try using the same method on the property FS, it doesn't work. To make AVS work via admin commands, all I had to do was set it up as:
Код:
PlayerInfo[playerid][pAdmin] >= 4;
(obviously 4 being the admin level)
With how the property FS is currently set up, it has:
Код:
if(!IsPlayerAdmin(playerid)) return 0;
//then the commands and everything start here
Basically what I'm asking, how would I converty if(!IsPlayerAdmin(playerid)) return 0; to PlayerInfo[playeri][pAdmin] >=4;
I've tried replacing the IsPlayerAdmin with PlayerInfo, but it just gave me a bunch of errors.
Re: Converting RCON admin to pAdmin? -
Nick.D - 29.08.2013
if(PlayerInfo[playerid][pAdmin] < 4) return 0;
Re: Converting RCON admin to pAdmin? -
SilentSoul - 29.08.2013
pawn Код:
if(PlayerInfo[playerid][pAdmin] > 1) SendClientMessage(playerid,-1,"test");
I hope you mean to make command use-able for admins level 4 not for rcon only
you can just start by if(PlayerInfo[playerid][pAdmin] > 1) and your command.
Re: Converting RCON admin to pAdmin? -
Bahooki - 29.08.2013
That's what I said I tried, but it just gave me some errors.
Re: Converting RCON admin to pAdmin? -
SilentSoul - 29.08.2013
Can you show me the errors ?
Re: Converting RCON admin to pAdmin? -
MarTaTa - 29.08.2013
probably you are trying to use your admin system on the FS. There are 2 solutions : you need to integrate the FS in the GM (which means copy /paste the FS in the main GM) or use pvars(for more info check samp wiki for the pvars). And anyways I strongly recommend to integrate the FS in the GM

I hope I helped
Re: Converting RCON admin to pAdmin? -
Konstantinos - 29.08.2013
Quote:
Originally Posted by Nick.D
if(PlayerInfo[playerid][pAdmin] < 4) return 0;
|
Nick already gave you a solution.
pawn Код:
if(PlayerInfo[playerid][pAdmin] < 4) return 0;
// code for the command, if he's admin greater or equal (>=) to 4.