Jump to content

Question

Posted

Problema intalnita (descriere):am comanda /setlevel dar cand dai cuiva admin se inchide serverul
Ero(area / rile) / warning-(ul / urile):0
Liniile de cod / sursa / script-ul:

CMD:setlevel( playerid, params[ ] )
{
	gsString[ 0 ] = EOS;

	if ( !IsPlayerAdmin( playerid ) && PlayerInfo[ playerid ][ rAdmin ] != 1 )
		return SendError( playerid, "You have to been logged in as RCON Admin to use this command!" );

	new
		Player,
		aLevel
	;
	if ( sscanf( params, "ui", Player, aLevel ) )
		return SendClientMessage( playerid, COLOR_ULTRARED, "USAGE: {33CCFF}/setlevel [PlayerID] [Level]" );

	if ( !IsPlayerConnected( Player ) && Player == INVALID_PLAYER_ID )
		return SendError( playerid, "Player not connected!" );

	if ( PlayerInfo[ Player ][ LoggedIn ] == 0 )
		return SendError( playerid, "Player must be registered and logged in!" );

	if ( aLevel > 10 )
		return SendError( playerid, "Incorrect Level" );

	if ( aLevel == PlayerInfo[ Player ][ Level ] )
		return SendError( playerid, "Player is already have this level" );

    if ( aLevel > 0 )
		format( gsString, sizeof( gsString ), "Administrator %s has set you to administrator status [Level: %d]", PlayerName( playerid ), aLevel );
    else
		format( gsString, sizeof( gsString ), "Administrator %s has set you to player status [Level: %d]", PlayerName( playerid ), aLevel );

	SendClientMessage( Player, COLOR_ABLUE, gsString );

    if ( aLevel > PlayerInfo[ Player ][ Level ] )
		Announce( Player, "~g~Promoted!", 2000, 3 );
    else
		Announce( Player,"~r~Demoted", 2000, 3 );

    FormatMSG( playerid, COLOR_ABLUE, "You have made %s Level %d on %s", PlayerName( Player ), aLevel, zDate( ) );

    format( gsString, sizeof( gsString ),"Administrator %s has made %s Level %d", PlayerName( playerid ), PlayerName( Player ), aLevel );
    SaveToFile( "AdminLog", gsString );
    PlayerInfo[ Player ][ Level ] = aLevel;

    PlayerPlaySound( Player, 1057, 0.0, 0.0, 0.0 );
    return 1;
}

Imagini / Video (optional):-
Ati incercat sa rezolvati singur?:Da am incercat

4 answers to this question

Recommended Posts

  • 0
Posted

=)) Nu e de la comanda, cred ca vrei sa folosesti WOS B26, degeaba, e buguit FULL!

242086.png

  • 0
Posted

Ce iti apare in server_log.txt . daca folosesti crashdetect iti va aparea ceva, daca nu foloseste-l si postezi ce iti da in log.

93.119.26.23:7777

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.