- 0
Problema /setlevel
-
Similar Content
-
Recently Browsing 0 members
- No registered users viewing this page.
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.
Question
SkyLeAs
Problema intalnita (descriere):Salut am facut si eu comanda /setlevel si imi da niste erori si nush ce are..
Ero(area / rile) / warning-(ul / urile):
Liniile de cod / sursa / script-ul:
CMD:setlevel( playerid, params[ ] ) { gsString[ 0 ] = EOS; if ( !IsPlayerAdmin( playerid ) ) return SendError( playerid, "You need to be logged as RCON before 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 > 999999999 && !IsPlayerAdmin( playerid ) ) return SendError( playerid, "Incorrect Level" ); if ( aLevel == RSZ_DATA[ playerid ][ RSZLevel ] ) 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 > RSZ_DATA[ playerid ][ RSZLevel ] ) 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( ) ); FormatLog( "Admin_Log", "[RCON] %s has made %s Level %d", PlayerName( playerid ), PlayerName( Player ), aLevel ); RSZ_DATA[ playerid ][ RSZLevel ] = aLevel; PlayerPlaySound( Player, 1057, 0.0, 0.0, 0.0 ); return ( 1 ); }RSZ_DATA
PublicEx OnPlayerLogin( playerid ) { RSZ_DATA[ playerid ][ ID ] = cache_get_field_content_int( 0, "ID", RSZ_Handle ) ; RSZ_DATA[ playerid ][ RSZLevel ] = cache_get_field_content_int( 0, "RSZLevel", RSZ_Handle ) ; SetTimerEx( "SpawnPlayerEx", 500, 0, "d", playerid ) ; RSZ_Logged[ playerid ] = true; return ( 1 ) ; }enum PlayerData { ID , RSZLevel, }Imagini / Video (optional):!
Ati incercat sa rezolvati singur?:Da am incercat si nmk.
5 answers to this question
Recommended Posts