HOW TO ?
#1

Look i want to make the following thing

Message of the day in-game
/afk command
/back command
admin command /get [player id]

p.s about message of the day

i wanna make it like that /setmotd [message] set by:&(Admin/Mod)

Help me please
Reply
#2

Wrong section, and why don't you download an Admin FS ?
Reply
#3

WTF?I have own admin system lol
and in what section should i put it?
Reply
#4

ZCMD/YCMD:
pawn Код:
CMD:afk( playerid, params[ ] ) {
    if( GetPVarInt( playerid, "afk" ) == 1 )
        return SendClientMessage( playerid, -1, "You're already AFK. " );
    SetPVarInt( playerid, "afk", 1 );
    SetPlayerVirtualWorld( playerid, playerid + 2 );
    new
        afkstr[ 40 ]
        ,lpname[ 24 ]
    ;
    GetPlayerName( playerid, lpname, sizeof lpname );
    format( afkstr, sizeof string, "%s is now AFK!", lpname );
    return SendClientMessageToAll( -1, afkstr );
}

CMD:back( playerid, params[ ] ) {
    if( GetPVarInt( playerid, "afk" ) == 0 )
        return SendClientMessage( playerid, -1, "You're not AFK. " );
    SetPVarInt( playerid, "afk", 0 );
    SetPlayerVirtualWorld( playerid, 0 );
    new
        afkstr[ 40 ]
        ,lpname[ 24 ]
    ;
    GetPlayerName( playerid, lpname, sizeof lpname );
    format( afkstr, sizeof string, "%s is now back!", lpname );
    return SendClientMessageToAll( -1, afkstr );
}

// Also uses SSCANF2.
CMD:get( playerid, params[ ] ) {
    new id;
    if( sscanf( params, "u", id ) )
        return SendClientMessage( playerid, -1, "Usage: /get [ID]." );
    if( !IsPlayerConnected( id ) )
        return SendClientMessage( playerid, -1, "Player not connected. " );
    if( id == playerid )
        return SendClientMessage( playerid, -1, "You cannot get yourself. " );
    new
        Float:x
        ,Float:y
        ,Float:z
    ;
    GetPlayerPos( playerid, x, y, z );
    SetPlayerPos( id, x, y, z );
    new
        str[ 128 ]
        ,pname[ 24 ]
        ,aname[ 24 ]
    ;
    GetPlayerName( playerid, aname, sizeof aname );
    GetPlayerName( id, pname, sizeof pname );
    format( str, sizeof str, "You have teleported %s to your position! ", pname );
    SendClientMessage( playerid, -1, str );
    format( str, sizeof str, "%s has teleported you to his position! ", aname );
    return SendClientMessage( id, -1, str );
}
Currently for all players, I need your admin level variables.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)