/nominate Command Please? - 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:  /nominate Command Please? (
/showthread.php?tid=465838)
 
/nominate Command Please? - 
MAFIAWARS -  24.09.2013
Hello ! Please can someone give me /makeadmin or /nominate Comamnd to make some player Admin of our server.
For Example: /makeadmin <playerid< <adminlevel> 
Thank you in Advance.
P.S: I found many CMDs but They are giving many errors and I cannot fixed them because they were too hard to fix.
Re: /nominate Command Please? - 
Wizza -  24.09.2013
We cant just make a cmd that makes admin for you without knowing what defines you have for admin like pAdmin etc..
Re: /nominate Command Please? - 
DanishHaq -  24.09.2013
What's your full variable for pAdmin?
Re: /nominate Command Please? - 
MAFIAWARS -  24.09.2013
Quote:
| 
					Originally Posted by DanishHaq  What's your full variable for pAdmin? | 
 
pawn Код:
enum PlayerInfo
{
    Pass[129], //User's password
    pAdminlevel, //User's admin level
 pAdminLevel,
    VIPlevel, //User's vip level
    Money, //User's money
    Scores, //User's scores
    Kills, //User's kills
    Deaths //User's deaths
}
 
Re: /nominate Command Please? - 
Konstantinos -  24.09.2013
Modify it.
pawn Код:
CMD:makeadmin( playerid, params[ ] )
{
    if( !IsPlayerAdmin( playerid ) ) return 1;
    new
        id,
        level
    ;
    if( sscanf( params, "ri", id, level ) ) return SendClientMessage( playerid, -1, "Syntax: /makeadmin <ID/Part Of Name> <level>" );
    if( id == INVALID_PLAYER_ID ) return SendClientMessage( playerid, -1, "Offline player" );
    if( level < 0 || level > 3 ) return SendClientMessage( playerid, -1, "Levels from 0 to 3" );
    pInfo[ id ][ pAdminlevel ] = level;
    return 1;
}
 
Re: /nominate Command Please? - Patrick -  24.09.2013
Try these command
pawn Код:
CMD:makeadmin(playerid, params[])
{
    new ID, AdmLvl;
    if(sscanf(params, "ui", ID, AdmLvl)) return SendClientMessage(playerid, -1, "Syntax: /makeadmin <playerid> <AdmLevel>");
    //if(pAdminlevel[playerid][pAdminlevel] == (Change This to Highest Admin Level) ) return 1; for example, basing on Konstatinos Script, you could put 3 above
    if(!IsPlayerConnected(ID)) return 1;
    pAdminlevel[ID][pAdminlevel] = AdmLvl;
    printf("[DEBUG]: Admin Level Command Working!");
    return 1;
}
 
Edit: Too late, try Konstantinos or mine, doesn't matter to be honest