Admin system
#3

Quote:
Originally Posted by Dayrion
Посмотреть сообщение
Hey. I'll try to answer.
Код:
First of all, how would I be able to create a rcon command which will be used to promote and demote admins?
You use IsPlayerAdmin(playerid), which allow only player connected with RCON to use your commande.
PHP код:
if(IsPlayerAdmin(playerid)) 
For your second question, I recommende to you to create a variable with different level, not with a boolean.
THere is an example because my english is pretty bad:
PHP код:
#define     PLAYER    0
#define     MODO     1
#define     GMODO     2
#define     ADMIN     3
CMD:goto(playeridparams[])
{
    if(
pAccount[playerid][pAdmin] < ADMIN) return 1;
// pAdmin is a integer which is storing admin lvl of the player even if the player is not an admin.
    
new target;
    if(
sscanf(params"u"target)) return SCM(playeridLBLUE"/goto [playerid/name]");
    if(!
IsPlayerConnected(target)) 
        return 
ErrorMsg(playerid"This player isn't connected.");
    new 
Float:x,
        
Float:y,
        
Float:z;
    
GetPlayerPos(targetxyz);
    
SetPlayerPos(playeridx+1y+1z);
    
SetPlayerInterior(playeridGetPlayerInterior(target));
    
SetPlayerVirtualWorld(playeridGetPlayerVirtualWorld(target));
    return 
1;

Thank you
Reply


Messages In This Thread
Admin system - by EtayJ - 22.09.2016, 11:56
Re: Admin system - by Dayrion - 22.09.2016, 15:54
Re: Admin system - by EtayJ - 22.09.2016, 17:57

Forum Jump:


Users browsing this thread: 1 Guest(s)