Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerConnect(playerid)
- {
- PlayAudioStreamForPlayer(playerid, "https://www.dropbox.com/s/986m4s3ovtvsz53/V%20-%20RP%20%2821%20-%20rockstar%29.mp3?dl=1");
- ServerInfo[BrojPosetaServeru]++;
- CheckRekord();
- PlayerInfo[playerid][xID] = 0;
- ResetPlayer(playerid);
- SetPlayerVirtualWorld(playerid, (playerid + 2000));
- SetPlayerColor(playerid, 0xAFAFAF00);
- #if ZIMSKI_MOD == 1
- action_effect = defer ActionEffect[1900](playerid);
- #endif
- CreatePlayerTextDraws(playerid);
- PreloadAnimations(playerid);
- static str[300];
- GetPlayerIp(playerid, str, sizeof(str));
- format(str, sizeof(str), "Igrac: %s | IP: %s", ImeIgraca(playerid), str);
- LogSave("Logovi/LogConnect.log", str);
- mysql_format(mSQL, str, sizeof(str),
- "SELECT `registered`, `password`, `user_id`, `level`, `exp`, `xOnlineSati`, `country`, `money`, `xBRacun`, `job_id`, `contract`, `skin_id`, \
- `warn`, `admin_lvl`, `helper_level`, `xTestAdmin`, `vip_level`, `v_poen`, `xVCoin`, `xTogStats` FROM `users` WHERE `p_name` = '%e' LIMIT 1", ImeIgraca(playerid));
- mysql_pquery(mSQL, str, "CheckPlayerAccount", "i", playerid);
- return(true);
- }
- protected CheckPlayerAccount( playerid )
- {
- new rows, fields;
- cache_get_data( rows, fields, mSQL );
- if( !rows )
- {
- if( !IsValidRoleplayName( ImeIgraca( playerid ) ) )
- {
- SendClientMessage( playerid, CRVENA, "#NON-RP NICKNAME: {FFFFFF}Dobili ste kick zbog krivo formatiranog imena." );
- SendClientMessage( playerid, CRVENA, "#NON-RP NICKNAME: {FFFFFF}Vase ime mora biti u formatu {FA5555}'Ime_Prezime'." );
- defer KickIgraca(playerid);
- return 1;
- }
- if( ServerInfo[ Registracija ] == false )
- {
- SendClientMessage( playerid, CRVENA, "#REGISTER: {FFFFFF}REGISTRACIJA JE TRENUTNO ONEMOGUCENA." );
- SendClientMessage( playerid, CRVENA, "#REGISTER: {FFFFFF}V - ADMIN TEAM." );
- defer KickIgraca(playerid);
- return 1;
- }
- Register(playerid);
- }
- else
- {
- cache_get_field_content( 0, "password", PlayerInfo[ playerid ][ xLozinka ], mSQL, 150 );
- PlayerInfo[ playerid ][ xRegistrovan ] = cache_get_field_content_int( 0, "registered" );
- PlayerInfo[ playerid ][ xID ] = cache_get_field_content_int( 0, "user_id" );
- PlayerInfo[ playerid ][ xLevel ] = cache_get_field_content_int( 0, "level" );
- PlayerInfo[ playerid ][ xRespekt ] = cache_get_field_content_int( 0, "exp" );
- PlayerInfo[ playerid ][ xOnlineSati ] = cache_get_field_content_int( 0, "xOnlineSati" );
- PlayerInfo[ playerid ][ xDrzava ] = cache_get_field_content_int( 0, "country" );
- PlayerInfo[ playerid ][ xNovac ] = cache_get_field_content_int( 0, "money" );
- PlayerInfo[ playerid ][ xBRacun ] = cache_get_field_content_int( 0, "xBRacun" );
- PlayerInfo[ playerid ][ xPosao ] = cache_get_field_content_int( 0, "job_id" );
- PlayerInfo[ playerid ][ xUgovor ] = cache_get_field_content_int( 0, "contract" );
- PlayerInfo[ playerid ][ xSkin ] = cache_get_field_content_int( 0, "skin_id" );
- PlayerInfo[ playerid ][ xWarn ] = cache_get_field_content_int( 0, "warn" );
- PlayerInfo[ playerid ][ xAdmin ] = cache_get_field_content_int( 0, "admin_lvl" );
- PlayerInfo[ playerid ][ xHelper ] = cache_get_field_content_int( 0, "helper_level" );
- PlayerInfo[ playerid ][ xTestAdmin ] = cache_get_field_content_int( 0, "xTestAdmin" );
- PlayerInfo[ playerid ][ xVIPLevel ] = cache_get_field_content_int( 0, "vip_level" );
- PlayerInfo[ playerid ][ xVPoen ] = cache_get_field_content_int( 0, "v_poen" );
- PlayerInfo[ playerid ][ xVCoin ] = cache_get_field_content_int( 0, "xVCoin" );
- PlayerInfo[ playerid ][ xTogStats ] = bool:cache_get_field_content_int( 0, "xTogStats" );
- if( PlayerInfo[ playerid ][ xRegistrovan ] == 1 )
- {
- new query[128];
- mysql_format( mSQL, query, sizeof(query), "SELECT * FROM `banned` WHERE `user_id` = '%d' LIMIT 1", PlayerInfo[ playerid ][ xID ] );
- mysql_pquery( mSQL, query, "CheckPlayerBan", "i", playerid );
- }
- else
- {
- if( ServerInfo[ Registracija ] == false )
- {
- SendClientMessage( playerid, CRVENA, "#REGISTER: {FFFFFF}REGISTRACIJA JE TRENUTNO ONEMOGUCENA." );
- SendClientMessage( playerid, CRVENA, "#REGISTER: {FFFFFF}V - ADMIN TEAM." );
- defer KickIgraca(playerid);
- return 1;
- }
- Register(playerid);
- }
- }
- return(true);
- }
- protected selectQueryAdminList( playerid )
- {
- new rows, fields, p_name[ 24 ], last_login[ 64 ], admin_lvl, is_online;
- cache_get_data( rows, fields, mSQL );
- if( rows )
- {
- strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ) );
- for( new i = 0; i < rows; i ++ )
- {
- admin_lvl = cache_get_field_content_int( i, "admin_lvl" );
- is_online = cache_get_field_content_int( i, "isonline" );
- cache_get_field_content( i, "p_name", p_name, mSQL, 24 );
- if(admin_lvl < 1) admin_lvl = 100;
- if( is_online == 0 ) cache_get_field_content( i, "last_login", last_login, mSQL, 64 );
- if( is_online == 0 )
- {
- format( globalstring, sizeof( globalstring ), "{C395EA}%d - {FFFFFF}%s | %s | {FF0000}%s\n", i+1, p_name, getAdminRankNamebyRank(admin_lvl), last_login );
- strcat( DialogStrgEx, globalstring );
- }
- else
- {
- format( globalstring, sizeof( globalstring ), "{C395EA}%d - {FFFFFF}%s | %s | {00FF00}Online\n", i+1, p_name, getAdminRankNamebyRank(admin_lvl) );
- strcat( DialogStrgEx, globalstring );
- }
- }
- ShowPlayerDialog( playerid, 0, DIALOG_STYLE_MSGBOX, "{FFFFFF}Lista svih Admina:", DialogStrgEx, "Ok", "" );
- strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ) );
- }
- else SendErrorMessage( playerid, "Nema admina." );
- return(true);
- }
- protected selectQueryHelperList( playerid )
- {
- new rows, fields, p_name[ 24 ], helper_level, is_online, last_login[30];
- cache_get_data( rows, fields, mSQL );
- if( rows )
- {
- strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ) );
- for( new i = 0; i < rows; i ++ )
- {
- helper_level = cache_get_field_content_int( i, "helper_level" );
- is_online = cache_get_field_content_int( i, "isonline" );
- cache_get_field_content( i, "p_name", p_name, mSQL, 24 );
- if( is_online == 0) cache_get_field_content(i, "last_login", last_login, mSQL, 30);
- if( is_online > 0 )
- {
- format( globalstring, sizeof( globalstring ), "{C395EA}%d - {FFFFFF}%s - H|%d - {FF0000}%s\n", i+1, p_name, helper_level, last_login );
- strcat( DialogStrgEx, globalstring );
- }
- else
- {
- format( globalstring, sizeof( globalstring ), "{C395EA}%d - {FFFFFF}%s - H|%d - {00FF00}Online\n", i+1, p_name, helper_level );
- strcat( DialogStrgEx, globalstring );
- }
- }
- ShowPlayerDialog( playerid, 0, DIALOG_STYLE_MSGBOX, "{FFFFFF}Lista svim Helpera:", DialogStrgEx, "Ok", "" );
- strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ) );
- }
- else SendErrorMessage( playerid, "Nema helpera." );
- return(true);
- }
- protected selectQueryVehModelList( playerid, model )
- {
- new rows, fields;
- cache_get_data( rows, fields, mSQL );
- if( rows )
- {
- strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ) );
- new autoid = -1, vehSqlID = -1;
- for( new j = 0; j < rows; j ++ )
- {
- vehSqlID = cache_get_field_content_int( j, "veh_id" );
- if( vehSqlID != -1 )
- {
- for( new i = 1; i <= GetVehiclePoolSize(); i++ )
- {
- if( VehicleInfo[ i ][ vSqlID ] == vehSqlID )
- {
- format( globalstring, sizeof( globalstring ), "{FFFFFF}[ ingameID - %d ] - {C395EA}[ sqlBaseID - %d ]\n", i, vehSqlID );
- strcat( DialogStrgEx, globalstring );
- autoid = i;
- }
- }
- if( autoid == -1 )
- {
- format( globalstring, sizeof( globalstring ), "{FFFFFF}[ nije kreirano ingame ] - {C395EA}[ sqlBaseID - %d ]\n", vehSqlID );
- strcat( DialogStrgEx, globalstring );
- }
- }
- }
- if( strlen( DialogStrgEx ) == 0 ) return SendErrorMessage( playerid, "Nema nijednog vozila sa unetim modelom." );
- format( globalstring, sizeof( globalstring ), "{C395EA}VOZILA - {FFFFFF}%s", GetVehicleNameEx( model ) );
- ShowPlayerDialog( playerid, 0, DIALOG_STYLE_MSGBOX, globalstring, DialogStrgEx, "Ok", "" );
- strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ) );
- }
- return(true);
- }
- protected selectQueryAuctionList( playerid )
- {
- new rows, fields;
- cache_get_data( rows, fields, mSQL );
- if( rows )
- {
- strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ) );
- new vehSqlID = -1, vehModel;
- for( new i = 0; i < rows; i ++ )
- {
- vehSqlID = cache_get_field_content_int( i, "veh_id" );
- vehModel = cache_get_field_content_int( i, "v_model" );
- if( vehSqlID != -1 )
- {
- format( globalstring, sizeof( globalstring ), "{FFFFFF}Vozilo %s - {C395EA}[ sqlBaseID - %d ]\n", GetVehicleNameEx( vehModel ), vehSqlID );
- strcat( DialogStrgEx, globalstring );
- }
- }
- if( strlen( DialogStrgEx ) == 0 ) return SendErrorMessage( playerid, "Nema nijednog vozila za aukciju." );
- strcat( DialogStrgEx, "\n\n{FFFFFF}Da spawnas neko vozilo sa aukcije {C395EA}/vsaaukcije [ sqlBaseID ] [ playerID ] [ money ]{FFFFFF}\nplayerID predstavlja ID igraca koji ce dobiti to vozilo u statsima\nMoney predstavlja novac koji mu oduzimas za vozilo.\nPrimer: 10 321 456000." );
- ShowPlayerDialog( playerid, 0, DIALOG_STYLE_MSGBOX, "{C395EA}VOZILA ZA AUKCIJU", DialogStrgEx, "Ok", "" );
- strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ) );
- }
- else return SendErrorMessage( playerid, "Nema nijednog vozila za aukciju." );
- return(true);
- }
- protected OnClothesLoad( playerid )
- {
- new rows, fields;
- cache_get_data( rows, fields, mSQL );
- if( !rows )
- {
- new query[ 2048 ];
- format( query, sizeof( query ),
- "INSERT INTO `user_clothes` (user_id, cloth_slot_1, cloth_slot_1_p1, cloth_slot_1_p2, cloth_slot_1_p3, cloth_slot_1_p4, cloth_slot_1_p5, cloth_slot_1_p6, cloth_slot_1_p7, cloth_slot_1_p8, cloth_slot_1_p9, \
- cloth_slot_2, cloth_slot_2_p1, cloth_slot_2_p2, cloth_slot_2_p3, cloth_slot_2_p4, cloth_slot_2_p5, cloth_slot_2_p6, cloth_slot_2_p7, cloth_slot_2_p8, cloth_slot_2_p9," );
- format( query, sizeof( query ), "%s cloth_slot_3, cloth_slot_3_p1, cloth_slot_3_p2, cloth_slot_3_p3, cloth_slot_3_p4, cloth_slot_3_p5, cloth_slot_3_p6, cloth_slot_3_p7, cloth_slot_3_p8, cloth_slot_3_p9, \
- cloth_slot_4, cloth_slot_4_p1, cloth_slot_4_p2, cloth_slot_4_p3, cloth_slot_4_p4, cloth_slot_4_p5, cloth_slot_4_p6, cloth_slot_4_p7, cloth_slot_4_p8, cloth_slot_4_p9 )", query );
- mysql_format( mSQL, query, sizeof( query ), "%s VALUES('%d', \
- '%d', '%f', '%f', '%f', '%f', '%f', '%f', '%f', '%f', '%f', \
- '%d', '%f', '%f', '%f', '%f', '%f', '%f', '%f', '%f', '%f', \
- '%d', '%f', '%f', '%f', '%f', '%f', '%f', '%f', '%f', '%f', \
- '%d', '%f', '%f', '%f', '%f', '%f', '%f', '%f', '%f', '%f')", query, PlayerInfo[ playerid ][ xID ],
- clothes_info[ playerid ][ x_slot_1_model ], clothes_info[ playerid ][ x_slot_1_pos ][ 0 ], clothes_info[ playerid ][ x_slot_1_pos ][ 1 ],
- clothes_info[ playerid ][ x_slot_1_pos ][ 2 ], clothes_info[ playerid ][ x_slot_1_pos ][ 3 ], clothes_info[ playerid ][ x_slot_1_pos ][ 4 ],
- clothes_info[ playerid ][ x_slot_1_pos ][ 5 ], clothes_info[ playerid ][ x_slot_1_pos ][ 6 ], clothes_info[ playerid ][ x_slot_1_pos ][ 7 ],
- clothes_info[ playerid ][ x_slot_1_pos ][ 8 ],
- clothes_info[ playerid ][ x_slot_2_model ], clothes_info[ playerid ][ x_slot_2_pos ][ 0 ], clothes_info[ playerid ][ x_slot_2_pos ][ 1 ],
- clothes_info[ playerid ][ x_slot_2_pos ][ 2 ], clothes_info[ playerid ][ x_slot_2_pos ][ 3 ], clothes_info[ playerid ][ x_slot_2_pos ][ 4 ],
- clothes_info[ playerid ][ x_slot_2_pos ][ 5 ], clothes_info[ playerid ][ x_slot_2_pos ][ 6 ], clothes_info[ playerid ][ x_slot_2_pos ][ 7 ],
- clothes_info[ playerid ][ x_slot_2_pos ][ 8 ],
- clothes_info[ playerid ][ x_slot_3_model ], clothes_info[ playerid ][ x_slot_3_pos ][ 0 ], clothes_info[ playerid ][ x_slot_3_pos ][ 1 ],
- clothes_info[ playerid ][ x_slot_3_pos ][ 2 ], clothes_info[ playerid ][ x_slot_3_pos ][ 3 ], clothes_info[ playerid ][ x_slot_3_pos ][ 4 ],
- clothes_info[ playerid ][ x_slot_3_pos ][ 5 ], clothes_info[ playerid ][ x_slot_3_pos ][ 6 ], clothes_info[ playerid ][ x_slot_3_pos ][ 7 ],
- clothes_info[ playerid ][ x_slot_3_pos ][ 8 ],
- clothes_info[ playerid ][ x_slot_4_model ], clothes_info[ playerid ][ x_slot_4_pos ][ 0 ], clothes_info[ playerid ][ x_slot_4_pos ][ 1 ],
- clothes_info[ playerid ][ x_slot_4_pos ][ 2 ], clothes_info[ playerid ][ x_slot_4_pos ][ 3 ], clothes_info[ playerid ][ x_slot_4_pos ][ 4 ],
- clothes_info[ playerid ][ x_slot_4_pos ][ 5 ], clothes_info[ playerid ][ x_slot_4_pos ][ 6 ], clothes_info[ playerid ][ x_slot_4_pos ][ 7 ],
- clothes_info[ playerid ][ x_slot_4_pos ][ 8 ] );
- mysql_tquery( mSQL, query);
- }
- else
- {
- clothes_info[ playerid ][ x_slot_1_model ] = cache_get_field_content_int(0, "cloth_slot_1");
- clothes_info[ playerid ][ x_slot_1_pos ][ 0 ] = cache_get_field_content_float(0, "cloth_slot_1_p1");
- clothes_info[ playerid ][ x_slot_1_pos ][ 1 ] = cache_get_field_content_float(0, "cloth_slot_1_p2");
- clothes_info[ playerid ][ x_slot_1_pos ][ 2 ] = cache_get_field_content_float(0, "cloth_slot_1_p3");
- clothes_info[ playerid ][ x_slot_1_pos ][ 3 ] = cache_get_field_content_float(0, "cloth_slot_1_p4");
- clothes_info[ playerid ][ x_slot_1_pos ][ 4 ] = cache_get_field_content_float(0, "cloth_slot_1_p5");
- clothes_info[ playerid ][ x_slot_1_pos ][ 5 ] = cache_get_field_content_float(0, "cloth_slot_1_p6");
- clothes_info[ playerid ][ x_slot_1_pos ][ 6 ] = cache_get_field_content_float(0, "cloth_slot_1_p7");
- clothes_info[ playerid ][ x_slot_1_pos ][ 7 ] = cache_get_field_content_float(0, "cloth_slot_1_p8");
- clothes_info[ playerid ][ x_slot_1_pos ][ 8 ] = cache_get_field_content_float(0, "cloth_slot_1_p9");
- clothes_info[ playerid ][ x_slot_2_model ] = cache_get_field_content_int(0, "cloth_slot_2");
- clothes_info[ playerid ][ x_slot_2_pos ][ 0 ] = cache_get_field_content_float(0, "cloth_slot_2_p1");
- clothes_info[ playerid ][ x_slot_2_pos ][ 1 ] = cache_get_field_content_float(0, "cloth_slot_2_p2");
- clothes_info[ playerid ][ x_slot_2_pos ][ 2 ] = cache_get_field_content_float(0, "cloth_slot_2_p3");
- clothes_info[ playerid ][ x_slot_2_pos ][ 3 ] = cache_get_field_content_float(0, "cloth_slot_2_p4");
- clothes_info[ playerid ][ x_slot_2_pos ][ 4 ] = cache_get_field_content_float(0, "cloth_slot_2_p5");
- clothes_info[ playerid ][ x_slot_2_pos ][ 5 ] = cache_get_field_content_float(0, "cloth_slot_2_p6");
- clothes_info[ playerid ][ x_slot_2_pos ][ 6 ] = cache_get_field_content_float(0, "cloth_slot_2_p7");
- clothes_info[ playerid ][ x_slot_2_pos ][ 7 ] = cache_get_field_content_float(0, "cloth_slot_2_p8");
- clothes_info[ playerid ][ x_slot_2_pos ][ 8 ] = cache_get_field_content_float(0, "cloth_slot_2_p9");
- clothes_info[ playerid ][ x_slot_3_model ] = cache_get_field_content_int(0, "cloth_slot_3");
- clothes_info[ playerid ][ x_slot_3_pos ][ 0 ] = cache_get_field_content_float(0, "cloth_slot_3_p1");
- clothes_info[ playerid ][ x_slot_3_pos ][ 1 ] = cache_get_field_content_float(0, "cloth_slot_3_p2");
- clothes_info[ playerid ][ x_slot_3_pos ][ 2 ] = cache_get_field_content_float(0, "cloth_slot_3_p3");
- clothes_info[ playerid ][ x_slot_3_pos ][ 3 ] = cache_get_field_content_float(0, "cloth_slot_3_p4");
- clothes_info[ playerid ][ x_slot_3_pos ][ 4 ] = cache_get_field_content_float(0, "cloth_slot_3_p5");
- clothes_info[ playerid ][ x_slot_3_pos ][ 5 ] = cache_get_field_content_float(0, "cloth_slot_3_p6");
- clothes_info[ playerid ][ x_slot_3_pos ][ 6 ] = cache_get_field_content_float(0, "cloth_slot_3_p7");
- clothes_info[ playerid ][ x_slot_3_pos ][ 7 ] = cache_get_field_content_float(0, "cloth_slot_3_p8");
- clothes_info[ playerid ][ x_slot_3_pos ][ 8 ] = cache_get_field_content_float(0, "cloth_slot_3_p9");
- clothes_info[ playerid ][ x_slot_4_model ] = cache_get_field_content_int(0, "cloth_slot_4");
- clothes_info[ playerid ][ x_slot_4_pos ][ 0 ] = cache_get_field_content_float(0, "cloth_slot_4_p1");
- clothes_info[ playerid ][ x_slot_4_pos ][ 1 ] = cache_get_field_content_float(0, "cloth_slot_4_p2");
- clothes_info[ playerid ][ x_slot_4_pos ][ 2 ] = cache_get_field_content_float(0, "cloth_slot_4_p3");
- clothes_info[ playerid ][ x_slot_4_pos ][ 3 ] = cache_get_field_content_float(0, "cloth_slot_4_p4");
- clothes_info[ playerid ][ x_slot_4_pos ][ 4 ] = cache_get_field_content_float(0, "cloth_slot_4_p5");
- clothes_info[ playerid ][ x_slot_4_pos ][ 5 ] = cache_get_field_content_float(0, "cloth_slot_4_p6");
- clothes_info[ playerid ][ x_slot_4_pos ][ 6 ] = cache_get_field_content_float(0, "cloth_slot_4_p7");
- clothes_info[ playerid ][ x_slot_4_pos ][ 7 ] = cache_get_field_content_float(0, "cloth_slot_4_p8");
- clothes_info[ playerid ][ x_slot_4_pos ][ 8 ] = cache_get_field_content_float(0, "cloth_slot_4_p9");
- }
- return(true);
- }
- protected CheckPlayerUnBan( playerid, imeigraca[] )
- {
- new rows, fields;
- cache_get_data( rows, fields, mSQL );
- if( !rows )
- {
- SendErrorMessage( playerid, "Taj igrac nije banovan!");
- }
- else
- {
- PlayerInfo[ playerid ][ xTUnban ]++;
- sql_user_update_integer( playerid, "xTUnban", PlayerInfo[ playerid ][ xTUnban ] );
- ServerInfo[ BanovanihKorisnika ]--;
- format( globalstring, sizeof( globalstring ), "[ADMIN] %s je unbanovao igraca %s.", ImeIgraca( playerid ), imeigraca );
- AdminPoruka( ADM_WARN, globalstring );
- format( globalstring, sizeof( globalstring ), "Unbanovali ste igraca %s!", imeigraca);
- SendClientMessage( playerid, -1, globalstring );
- sql_user_unban( cache_get_field_content_int( 0, "user_id" ) );
- new string[ 128 ];
- format( string, sizeof( string ), "Admin %s je unbanovao igraca %s", ImeIgraca( playerid ), imeigraca );
- LogSave( "Logovi/LogUnban.log", string );
- }
- return(true);
- }
- protected CheckPlayerRename( renameid, playerid, novoime[] )
- {
- new rows, fields;
- cache_get_data( rows, fields, mSQL );
- if( rows )
- {
- SendErrorMessage( playerid, "Novo ime vec postoji u bazi podataka!" );
- }
- else
- {
- format( globalstring, sizeof( globalstring ), "#RENAME: Admin %s je promenio ime igracu %s u %s.", ImeIgraca( playerid ), ImeIgraca( renameid ), novoime );
- AdminPoruka( CRVENA, globalstring );
- RenamePlayer( ImeIgraca( renameid ), novoime, renameid );
- SendInfoMessage( renameid, "Admin %s vam je promenio ime u %s.", ImeIgraca( playerid ), ImeIgraca( renameid ) );
- }
- return(true);
- }
- protected CheckPlayerOffRank( playerid, type, imeigraca[] )
- {
- new rows, fields;
- cache_get_data( rows, fields, mSQL );
- if( !rows )
- {
- SendErrorMessage( playerid, "Taj igrac ne postoji u bazi podataka!");
- }
- else
- {
- new user_id = cache_get_field_content_int( 0, "user_id" );
- if( type == 1 )
- {
- new q[ 144 ];
- mysql_format( mSQL, q, sizeof(q), "UPDATE `users` SET `admin_lvl` = '0', `skin_id` = '%d', `spawn` = '0' WHERE `user_id` = '%d' LIMIT 1", MALE_SKIN, user_id );
- mysql_tquery( mSQL, q );
- SCMF( playerid, CRVENA, "#OFFRANK: {FFFFFF}Smenili ste offline Admina %s.", imeigraca );
- format( q, sizeof( q ), "Admin %s je smenio %s sa pozicije Admina", ImeIgraca( playerid ), imeigraca );
- LogSave( "Logovi/LogSmjeniAdmin.log", q );
- }
- else if( type == 2 )
- {
- new q[ 144 ];
- mysql_format( mSQL, q, sizeof(q), "UPDATE `users` SET `helper_level` = '0', `skin_id` = '%d', `spawn` = '0' WHERE `user_id` = '%d' LIMIT 1", MALE_SKIN, user_id );
- mysql_tquery( mSQL, q );
- SCMF( playerid, CRVENA, "#OFFRANK: {FFFFFF}Smenili ste offline Helpera %s.", imeigraca );
- format( q, sizeof( q ), "Admin %s je smenio %s sa pozicije Helpera.", ImeIgraca( playerid ), imeigraca );
- LogSave( "Logovi/LogSmjeniHelper.log", q );
- }
- else if( type == 3 )
- {
- new q[ 144 ];
- mysql_format( mSQL, q, sizeof(q), "UPDATE `users` SET `xTestAdmin` = '0', `skin_id` = '%d', `spawn` = '0' WHERE `user_id` = '%d' LIMIT 1", MALE_SKIN, user_id );
- mysql_tquery( mSQL, q );
- SCMF( playerid, CRVENA, "#OFFRANK: {FFFFFF}Smenili ste offline Test Admina %s.", imeigraca );
- format( q, sizeof( q ), "Admin %s je smenio %s sa pozicije Test Admina.", ImeIgraca( playerid ), imeigraca );
- LogSave( "Logovi/LogSmjeniTAdmin.log", q );
- }
- }
- return(true);
- }
- protected CheckPlayerOffJandP( playerid, type, imeigraca[], vreme, razlog[] )
- {
- new rows, fields;
- cache_get_data( rows, fields, mSQL );
- if( !rows ) {
- SendErrorMessage( playerid, "Taj igrac ne postoji u bazi podataka!");
- }
- else {
- new user_id = cache_get_field_content_int( 0, "user_id" );
- new mail_e[ 128 ];
- cache_get_field_content( 0, "email", mail_e, mSQL, 128 );
- if( type == JAIL )
- {
- new q[ 256 ];
- mysql_format( mSQL, q, sizeof(q), "UPDATE `users` SET `jail_type` = '%d', `jail_time` = '%d', `offpjail` = '%e' WHERE `user_id` = '%d' LIMIT 1", JAIL, vreme, razlog, user_id );
- mysql_tquery( mSQL, q );
- PlayerInfo[ playerid ][ xTJail ]++;
- sql_user_update_integer( playerid, "xTJail", PlayerInfo[ playerid ][ xTJail ] );
- #if MAILER_ENABLED == 1
- new string[ 256 ];
- format( string, sizeof( string ), "Postovani %s, postavljeni ste u zatvor na nasem SA:MP serveru.\nRazlog: %s.\n \
- Ukoliko mislite da je greska, podnesite zalbu na forumu: www.v-rp.info/forum.\n\n\n \
- Sa postovanjem, V Administracija.", imeigraca, razlog );
- SendMail( mail_e, "[email protected]", "V Administracija", "V - OFFLINE JAIL", string );
- #endif
- SCMF( playerid, 0xFF6347FF, "#OFFJAIL: Postavili ste offline igraca %s u zatvor na %d minuta. Razlog: %s", imeigraca, vreme, razlog );
- new string1[ 128 ];
- format( string1, sizeof( string1 ), "Admin %s je offjailovao igraca %s | Razlog: %s", ImeIgraca( playerid ), imeigraca, razlog );
- LogSave( "Logovi/LogOffJail.log", string1 );
- }
- else if( type == PRISON )
- {
- new q[ 256 ];
- mysql_format( mSQL, q, sizeof(q), "UPDATE `users` SET `jail_type` = '%d', `jail_time` = '%d', `offpprison` = '%e' WHERE `user_id` = '%d' LIMIT 1", PRISON, vreme, razlog, user_id );
- mysql_tquery( mSQL, q );
- PlayerInfo[ playerid ][ xTJail ]++;
- sql_user_update_integer( playerid, "xTJail", PlayerInfo[ playerid ][ xTJail ] );
- #if MAILER_ENABLED == 1
- new string[ 256 ];
- format( string, sizeof( string ), "Postovani %s, postavljeni ste u prison na nasem SA:MP serveru.\nRazlog: %s.\n \
- Ukoliko mislite da je greska, podnesite zalbu na forumu: www.v-rp.info/forum.\n\n\n \
- Sa postovanjem, V Administracija.", imeigraca, razlog );
- SendMail( mail_e, "[email protected]", "V Administracija", "V - OFFLINE JAIL", string );
- #endif
- SCMF( playerid, 0xFF6347FF, "#OFFJAIL: Postavili ste offline igraca %s u prison na %d sati. Razlog: %s", imeigraca, (vreme/60), razlog );
- new string1[ 128 ];
- format( string1, sizeof( string1 ), "Admin %s je offprisonao igraca %s | Razlog: %s", ImeIgraca( playerid ), imeigraca, razlog );
- LogSave( "Logovi/LogOffPrison.log", string1 );
- }
- else if( type == MUTE ) {
- new q[ 256 ];
- mysql_format( mSQL, q, sizeof(q), "UPDATE `users` SET `mute` = '%d', `offpmute` = '%e' WHERE `user_id` = '%d' LIMIT 1", vreme, razlog, user_id );
- mysql_tquery( mSQL, q );
- #if MAILER_ENABLED == 1
- new string[ 256 ];
- format( string, sizeof( string ), "Postovani %s, mutirani ste na nasem SA:MP serveru.\nRazlog: %s.\n \
- Ukoliko mislite da je greska, podnesite zalbu na forumu: www.v-rp.info/forum.\n\n\n \
- Sa postovanjem, V Administracija.", imeigraca, razlog );
- SendMail( mail_e, "[email protected]", "V Administracija", "V - OFFLINE JAIL", string );
- #endif
- SCMF( playerid, 0xFF6347FF, "#OFFMUTE: Postavili ste offline igraca %s mute na %d minuta. Razlog: %s", imeigraca, (vreme/60), razlog );
- new string1[ 128 ];
- format( string1, sizeof( string1 ), "Admin %s je offmute igraca %s | Razlog: %s", ImeIgraca( playerid ), imeigraca, razlog );
- LogSave( "Logovi/LogOffMute.log", string1 );
- }
- }
- return(true);
- }
- protected CheckPlayerRemoveAcc( playerid, imeigraca[] )
- {
- new rows, fields;
- cache_get_data( rows, fields, mSQL );
- if( !rows ) {
- SendErrorMessage( playerid, "Taj igrac ne postoji u bazi podataka!");
- }
- else {
- new property_id_1 = cache_get_field_content_int( 0, "property_id_1" );
- new property_id_2 = cache_get_field_content_int( 0, "property_id_2" );
- new property_id_3 = cache_get_field_content_int( 0, "property_id_3" );
- new bussines_id = cache_get_field_content_int( 0, "bussines_id" );
- new garage_id = cache_get_field_content_int( 0, "garage_id" );
- if( property_id_1 != -1 && strcmp( imeigraca, II[ property_id_1 ][ iOwner ], true) == 0)
- {
- II[ property_id_1 ][ iOwned ] = 0;
- II[ property_id_1 ][ iOnAuction ] = true;
- II[ property_id_1 ][ iNeaktivnost ] = 0;
- II[ property_id_1 ][ iOwnerSQLID ] = -1;
- strmid( II[ property_id_1 ][ iOwner], "Drzava", 0, strlen( "Drzava" ), 32);
- PropertyRefresh( property_id_1 );
- Property_checkGarage( property_id_1 );
- SaveProperty( property_id_1 );
- SendInfoMessage( playerid, "Imovina ID: %d je prodata na buy igracu %s, zbog brisanja naloga.", property_id_1, imeigraca );
- }
- if( property_id_2 != -1 && strcmp( imeigraca, II[ property_id_2 ][ iOwner ], true) == 0)
- {
- II[ property_id_2 ][ iOwned ] = 0;
- II[ property_id_2 ][ iOnAuction ] = true;
- II[ property_id_2 ][ iNeaktivnost ] = 0;
- II[ property_id_2 ][ iOwnerSQLID ] = -1;
- strmid( II[ property_id_2 ][ iOwner], "Drzava", 0, strlen( "Drzava" ), 32);
- PropertyRefresh( property_id_2 );
- Property_checkGarage( property_id_2 );
- SaveProperty( property_id_2 );
- SendInfoMessage( playerid, "Imovina ID: %d je prodata na buy igracu %s, zbog brisanja naloga.", property_id_2, imeigraca );
- }
- if( property_id_3 != -1 && strcmp( imeigraca, II[ property_id_3 ][ iOwner ], true) == 0)
- {
- II[ property_id_3 ][ iOwned ] = 0;
- II[ property_id_3 ][ iOnAuction ] = true;
- II[ property_id_3 ][ iNeaktivnost ] = 0;
- II[ property_id_3 ][ iOwnerSQLID ] = -1;
- strmid( II[ property_id_3 ][ iOwner], "Drzava", 0, strlen( "Drzava" ), 32);
- PropertyRefresh( property_id_3 );
- Property_checkGarage( property_id_3 );
- SaveProperty( property_id_3 );
- SendInfoMessage( playerid, "Imovina ID: %d je prodata na buy igracu %s, zbog brisanja naloga.", property_id_3, imeigraca );
- }
- if( bussines_id != 0 )
- {
- for( new i = 1; i < MAX_BUSSINES; i++ )
- {
- if( bussines_id == BusinessInfo[ i ][ b_ID ] )
- {
- if( i != -1 && strcmp( imeigraca, BusinessInfo[ i ][ bOwner ], true) == 0)
- {
- BusinessInfo[ i ][ bOwner_sqlID ] = -1;
- BusinessInfo[ i ][ bOnAuction ] = true;
- BusinessInfo[ i ][ bNeaktivnost ] = 0;
- BusinessInfo[ i ][ bFacture ] = 100;
- strmid( BusinessInfo[ i ][ bOwner ], "Drzava", 0, strlen( "Drzava" ), 32);
- Bussines_Refresh( i );
- new q[ 256 ];
- mysql_format( mSQL, q, sizeof(q), "UPDATE `bussines` SET `b_owner_sqlID` = '%d', `bOnAuction` = '1', `bOwner` = '%s', `b_neaktivnost` = '%d', `b_facture` = '%d' WHERE `bussines_id` = '%d'",
- BusinessInfo[ i ][ bOwner_sqlID ],
- BusinessInfo[ i ][ bOwner ],
- BusinessInfo[ i ][ bNeaktivnost ],
- BusinessInfo[ i ][ bFacture ],
- BusinessInfo[ i ][ b_ID ] );
- mysql_tquery( mSQL, q );
- SendInfoMessage( playerid, "Firma ID: %d je prodata na buy igracu %s, zbog brisanja naloga.", i, imeigraca );
- break;
- }
- }
- }
- }
- if( garage_id != 0 )
- {
- for( new i = 1; i < MAX_GARAGES; i++ )
- {
- if( garage_id == garageInfo[ i ][ garageSqlID ] )
- {
- if( i != -1 && strcmp( imeigraca, garageInfo[ i ][ garageOwner ], true ) == 0)
- {
- garageInfo[ i ][ garageOwner_SqlID ] = -1;
- strmid( garageInfo[ i ][ garageOwner ], "Drzava", 0, strlen( "Drzava" ), 32);
- Garage_Refresh( i );
- new q[ 256 ];
- mysql_format( mSQL, q, sizeof(q), "UPDATE `garages` SET `owner_id` = '%d' WHERE `garage_id` = '%d'",
- garageInfo[ i ][ garageOwner_SqlID ],
- garageInfo[ i ][ garageSqlID ] );
- mysql_tquery( mSQL, q );
- SendInfoMessage( playerid, "Garaza ID: %d je prodata na buy igracu %s, zbog brisanja naloga.", i, imeigraca );
- break;
- }
- }
- }
- }
- new query[ 256 ];
- mysql_format( mSQL, query, sizeof(query), "SELECT users.user_id, users.email, users.vehicle_slots, IFNULL(vehicles.veh_id, 0) AS `veh_id`, IFNULL(vehicles.v_model, 0) AS `v_model` FROM users \
- LEFT JOIN vehicles ON users.user_id = vehicles.owner_sqlID \
- WHERE users.p_name = '%e'", imeigraca );
- mysql_pquery( mSQL, query, "CheckPlayerRemoveVehAcc", "is", playerid, imeigraca );
- }
- return(true);
- }
- protected CheckPlayerRemoveVehAcc( playerid, imeigraca[] )
- {
- new rows, fields;
- cache_get_data( rows, fields, mSQL );
- if( !rows )
- {
- SendErrorMessage( playerid, "Taj igrac ne postoji u bazi podataka.");
- }
- else
- {
- new user_id = cache_get_field_content_int( 0, "user_id" );
- new mail_e[ 128 ];
- cache_get_field_content( 0, "email", mail_e, mSQL, 128 );
- new veh_id, veh_model;
- for( new i = 0; i < rows; i ++ ) {
- veh_id = cache_get_field_content_int( i, "veh_id" );
- veh_model = cache_get_field_content_int( i, "v_model" );
- if( veh_id > 0 && veh_model >= 400 ) {
- new q[ 512 ];
- mysql_format( mSQL, q, sizeof(q), "UPDATE `vehicles` SET `owner_sqlID` = '0', `v_price` = '-1', `v_pos_x` = '-2112.0281', `v_pos_y` = '2729.6250', \
- `v_pos_z` = '166.0840', `v_pos_a` = '202.9713', `v_virtualw` = '0', `v_interior` = '0' WHERE `veh_id` = '%d' LIMIT 1", veh_id );
- mysql_tquery( mSQL, q );
- SendInfoMessage( playerid, "Vozilo %s ID u bazi: %d je postavljeno na aukciju igracu %s, zbog brisanja naloga.", GetVehicleNameEx( veh_model ), veh_id, imeigraca );
- }
- }
- #if MAILER_ENABLED == 1
- new string[ 256 ];
- format( string, sizeof( string ), "Postovani %s, vas nalog je obrisan sa naseg SA:MP servera.\n \
- Ukoliko mislite da je greska, podnesite zalbu na forumu: www.v-rp.info/forum.\n\n\n \
- Sa postovanjem, V Administracija.", imeigraca );
- SendMail( mail_e, "[email protected]", "V Administracija", "V - BRISANJE NALOGA", string );
- #endif
- new query[ 128 ];
- mysql_format( mSQL, query, sizeof( query ), "DELETE FROM `users` WHERE `user_id` = '%d' LIMIT 1", user_id );
- mysql_tquery( mSQL, query );
- format( globalstring, sizeof( globalstring ), "[ADMIN] %s je obrisao account %s.", ImeIgraca( playerid ), imeigraca );
- AdminPoruka( ADM_WARN, globalstring );
- format( globalstring, sizeof( globalstring ), "Igracu %s je obrisan nalog od admina %s", imeigraca, ImeIgraca( playerid ) );
- LogSave( "Logovi/LogDeleteAccCMD.log", globalstring );
- }
- return(true);
- }
- protected CheckPlayerRemoveStats( playerid, vrsta, imeigraca[] )
- {
- new rows, fields;
- cache_get_data( rows, fields, mSQL );
- if( !rows ) {
- SendErrorMessage( playerid, "Taj igrac ne postoji u bazi podataka!");
- }
- else {
- new user_id = cache_get_field_content_int( 0, "user_id" );
- new mail_e[ 128 ];
- cache_get_field_content( 0, "email", mail_e, mSQL, 128 );
- switch( vrsta )
- {
- case 1:
- {
- new q[ 128 ];
- mysql_format( mSQL, q, sizeof(q), "UPDATE `users` SET `property_id_1` = '-1' WHERE `user_id` = '%d' LIMIT 1", user_id );
- mysql_pquery( mSQL, q, "", "");
- SCMF( playerid, 0xFF6347FF, "#REMOVESTATS: Maknuli ste offline korisniku %s imovinu 1 sa statsa.", imeigraca );
- #if MAILER_ENABLED == 1
- new string[ 256 ];
- format( string, sizeof( string ), "Postovani %s, doslo je do promene u statistikama na vasem SA:MP accontu.\nSa vaseg naloga je skinuto vlasnistvo nad imovinom 1.\n \
- Ukoliko mislite da je greska, podnesite zalbu na forumu: www.v-rp.info/forum.\n\n\n \
- Sa postovanjem, V Administracija.", imeigraca );
- SendMail( mail_e, "[email protected]", "V Administracija", "V - SKIDANJE VLASNISTVA", string );
- #endif
- new string1[ 128 ];
- format( string1, sizeof( string1 ), "Admin %s je maknuo sa statsa imovinu 1 igracu %s", ImeIgraca( playerid ), imeigraca );
- LogSave( "Logovi/LogMakniSaStatsa.log", string1 );
- }
- case 2:
- {
- new q[ 128 ];
- mysql_format( mSQL, q, sizeof(q), "UPDATE `users` SET `property_id_2` = '-1' WHERE `user_id` = '%d' LIMIT 1", user_id );
- mysql_pquery( mSQL, q, "", "");
- SCMF( playerid, 0xFF6347FF, "#REMOVESTATS: Maknuli ste offline korisniku %s imovinu 2 sa statsa.", imeigraca );
- #if MAILER_ENABLED == 1
- new string[ 256 ];
- format( string, sizeof( string ), "Postovani %s, doslo je do promene u statistikama na vasem SA:MP accontu.\nSa vaseg naloga je skinuto vlasnistvo nad imovinom 2.\n \
- Ukoliko mislite da je greska, podnesite zalbu na forumu: www.v-rp.info/forum.\n\n\n \
- Sa postovanjem, V Administracija.", imeigraca );
- SendMail( mail_e, "[email protected]", "V Administracija", "V - SKIDANJE VLASNISTVA", string );
- #endif
- new string1[ 128 ];
- format( string1, sizeof( string1 ), "Admin %s je maknuo sa statsa imovinu 2 igracu %s", ImeIgraca( playerid ), imeigraca );
- LogSave( "Logovi/LogMakniSaStatsa.log", string1 );
- }
- case 3:
- {
- new q[ 128 ];
- mysql_format( mSQL, q, sizeof(q), "UPDATE `users` SET `property_id_3` = '-1' WHERE `user_id` = '%d' LIMIT 1", user_id );
- mysql_pquery( mSQL, q, "", "");
- SCMF( playerid, 0xFF6347FF, "#REMOVESTATS: Maknuli ste offline korisniku %s imovinu 3 sa statsa.", imeigraca );
- #if MAILER_ENABLED == 1
- new string[ 256 ];
- format( string, sizeof( string ), "Postovani %s, doslo je do promene u statistikama na vasem SA:MP accontu.\nSa vaseg naloga je skinuto vlasnistvo nad imovinom 3.\n \
- Ukoliko mislite da je greska, podnesite zalbu na forumu: www.v-rp.info/forum.\n\n\n \
- Sa postovanjem, V Administracija.", imeigraca );
- SendMail( mail_e, "[email protected]", "V Administracija", "V - SKIDANJE VLASNISTVA", string );
- #endif
- new string1[ 128 ];
- format( string1, sizeof( string1 ), "Admin %s je maknuo sa statsa imovinu 3 igracu %s", ImeIgraca( playerid ), imeigraca );
- LogSave( "Logovi/LogMakniSaStatsa.log", string1 );
- }
- case 4:
- {
- new q[ 128 ];
- mysql_format( mSQL, q, sizeof(q), "UPDATE `users` SET `bussines_id` = '0' WHERE `user_id` = '%d' LIMIT 1", user_id );
- mysql_pquery( mSQL, q, "", "");
- SCMF( playerid, 0xFF6347FF, "#REMOVESTATS: Maknuli ste offline korisniku %s firmu sa statsa.", imeigraca );
- #if MAILER_ENABLED == 1
- new string[ 256 ];
- format( string, sizeof( string ), "Postovani %s, doslo je do promene u statistikama na vasem SA:MP accontu.\nSa vaseg naloga je skinuto vlasnistvo nad firmom.\n \
- Ukoliko mislite da je greska, podnesite zalbu na forumu: www.v-rp.info/forum.\n\n\n \
- Sa postovanjem, V Administracija.", imeigraca );
- SendMail( mail_e, "[email protected]", "V Administracija", "V - SKIDANJE VLASNISTVA", string );
- #endif
- new string1[ 128 ];
- format( string1, sizeof( string1 ), "Admin %s je maknuo sa statsa firmu igracu %s", ImeIgraca( playerid ), imeigraca );
- LogSave( "Logovi/LogMakniSaStatsa.log", string1 );
- }
- case 5:
- {
- SendErrorMessage(playerid, "Ne koristi se ova vrsta.");
- }
- case 6:
- {
- new q[ 128 ];
- mysql_format( mSQL, q, sizeof(q), "UPDATE `users` SET `field_id` = '-1' WHERE `user_id` = '%d' LIMIT 1", user_id );
- mysql_pquery( mSQL, q, "", "");
- SCMF( playerid, 0xFF6347FF, "#REMOVESTATS: Maknuli ste offline korisniku %s imanje sa statsa.", imeigraca );
- #if MAILER_ENABLED == 1
- new string[ 256 ];
- format( string, sizeof( string ), "Postovani %s, doslo je do promene u statistikama na vasem SA:MP accontu.\nSa vaseg naloga je skinuto vlasnistvo nad imanjem.\n \
- Ukoliko mislite da je greska, podnesite zalbu na forumu: www.v-rp.info/forum.\n\n\n \
- Sa postovanjem, V Administracija.", imeigraca );
- SendMail( mail_e, "[email protected]", "V Administracija", "V - SKIDANJE VLASNISTVA", string );
- #endif
- new string1[ 128 ];
- format( string1, sizeof( string1 ), "Admin %s je maknuo sa statsa imanje igracu %s", ImeIgraca( playerid ), imeigraca );
- LogSave( "Logovi/LogMakniSaStatsa.log", string1 );
- }
- }
- }
- return(true);
- }
- protected CheckPlayerChangePW( playerid, imeigraca[] )
- {
- new rows, fields;
- cache_get_data( rows, fields, mSQL );
- if( !rows ) {
- SendErrorMessage( playerid, "Taj igrac ne postoji u bazi podataka!");
- }
- else {
- new user_id = cache_get_field_content_int( 0, "user_id" );
- new mail_e[ 128 ];
- cache_get_field_content( 0, "email", mail_e, mSQL, 128 );
- new novalozinka[ 32 ];
- new randombroj = 100000 + random(899999);
- format( novalozinka, sizeof( novalozinka ), "%d", randombroj );
- format( globalstring, sizeof( globalstring ), "(ANTICHEAT): Igracu %s je promenjen password! Ostale informacije slede... Admin: %s", imeigraca, ImeIgraca( playerid ) );
- AdminPoruka( ANTICHEAT, globalstring );
- SCMF( playerid, ZUTA, "(ANTICHEAT): Igracu %s je dodjeljen novi pass: %s.", imeigraca, novalozinka );
- SCMF( playerid, ZUTA, "(ANTICHEAT): Igracu %s je server lozinku poslao na email.", imeigraca );
- #if MAILER_ENABLED == 1
- new string[ 256 ];
- format( string, sizeof( string ), "Postovani %s, promenjena je lozinka na vasem SA:MP accontu.\nNova lozinka glasi: %s.\n \
- Ukoliko vi niste trazili promenu lozinke, podnesite zalbu na forumu: www.v-rp.info/forum.\n\n\n \
- Sa postovanjem, V Administracija.", imeigraca, novalozinka );
- SendMail( mail_e, "[email protected]", "V Administracija", "V - PROMENA LOZINKE", string );
- #endif
- new hash_pass[ 65 ];
- SHA256_PassHash( novalozinka, ImeIgraca( playerid ), hash_pass, sizeof hash_pass );
- new q[ 200 ];
- mysql_format( mSQL, q, sizeof(q), "UPDATE `users` SET `password` = '%e' WHERE `user_id` = '%d'", hash_pass, user_id );
- mysql_tquery( mSQL, q );
- }
- return(true);
- }
- protected SellOffVehicle( playerid, imeigraca[] )
- {
- new rows, fields;
- cache_get_data( rows, fields, mSQL );
- if( !rows )
- {
- SendErrorMessage( playerid, "Izabrani igrac nema to vozilo u vlasnistvu.!");
- }
- else
- {
- strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ) );
- new veh_id = cache_get_field_content_int( 0, "veh_id" );
- new veh_model = cache_get_field_content_int( 0, "v_model" );
- new str[ 256 ];
- format( str, sizeof( str ), "{FFFFFF}Izabrano vozilo %s(SQLBaseID:%d) je u vlasnistvu %s.\n", GetVehicleNameEx( veh_model ), veh_model, imeigraca );
- strcat( DialogStrgEx, str );
- strcat( DialogStrgEx, "Da li ste sigurni da zelite da prodate to vozilo i da mu izbrisete iz statsa?" );
- VehicleOffSaleVehID[ playerid ] = veh_id;
- ShowPlayerDialog( playerid, dialog_OFFSELLVEH, DIALOG_STYLE_MSGBOX, D_NASLOV, DialogStrgEx, "Da", "Ne" );
- strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ) );
- }
- return(true);
- }
- protected CheckMaskID( playerid, mask_id )
- {
- new rows, fields;
- cache_get_data( rows, fields, mSQL );
- if( !rows )
- {
- SendErrorMessage( playerid, "Igrac sa takvim IDom maske ne postoji!");
- }
- else
- {
- new p_name[ MAX_PLAYER_NAME ];
- cache_get_field_content( 0, "p_name", p_name, mSQL, 24 );
- SendInfoMessage( playerid, "ID maske: %d, Ime Igraca: %s", mask_id, p_name );
- }
- return(true);
- }
- protected CheckPlayerOffVeh( playerid, imeigraca[] )
- {
- new rows, fields;
- cache_get_data( rows, fields, mSQL );
- if( !rows ) {
- SendErrorMessage( playerid, "Taj igrac ne postoji u bazi podataka!");
- }
- else {
- strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ) );
- new vehicle_slots = cache_get_field_content_int( 0, "vehicle_slots");
- new veh_model, veh_id;
- new str[ 256 ];
- format( str, sizeof( str ), "{FFFFFF}Broj slotova: {C395EA}[%d/%d]\n\n\nSpisak vozila:", vehicle_slots, MAX_VEH_SLOT );
- strcat( DialogStrgEx, str );
- for( new i = 0; i < rows; i ++ ) {
- veh_id = cache_get_field_content_int( i, "veh_id" );
- veh_model = cache_get_field_content_int( i, "v_model" );
- if( veh_id > 0 && veh_model >= 400 ) {
- format( str, sizeof( str ), "{FFFFFF}* Vozilo: {C395EA}[%d]\n {FFFFFF}- {C395EA}Ime vozila: {FFFFFF}[%s]\n - {C395EA}ID u bazi: {FFFFFF}[%d]\n",
- i+1,
- GetVehicleNameEx( veh_model ),
- veh_id );
- strcat( DialogStrgEx, str );
- }
- }
- format( globalstring, sizeof( globalstring ), "OFF VOZILA - %s", imeigraca );
- ShowPlayerDialog( playerid, 0, DIALOG_STYLE_MSGBOX, globalstring, DialogStrgEx, "Ok", "" );
- strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ) );
- }
- return(true);
- }
- protected CheckPlayerOffRich_Z( playerid, imeigraca[] ) {
- new query[ 1024 ];
- mysql_format( mSQL, query, sizeof(query), "SELECT users.money, users.xBRacun, users.property_id_1, users.property_id_2, users.property_id_3, users.bussines_id \
- IFNULL(org_members.org_id, 0) AS `org_id`, IFNULL(banned.ban_id, 0) AS `ban_id`, banned.ban_reason FROM users \
- LEFT JOIN org_members ON users.user_id = org_members.memb_sqlID \
- LEFT JOIN banned ON users.user_id = banned.user_id \
- WHERE users.p_name = '%e' LIMIT 1", imeigraca );
- mysql_pquery( mSQL, query, "CheckPlayerOffRich", "is", playerid, imeigraca );
- return(true);
- }
- protected CheckPlayerOffRich( playerid, imeigraca[] )
- {
- new rows, fields;
- cache_get_data( rows, fields, mSQL );
- if( !rows )
- {
- SendErrorMessage( playerid, "Taj igrac ne postoji u bazi podataka!");
- }
- else
- {
- new novac = cache_get_field_content_int(0, "money");
- new fsqlID = cache_get_field_content_int(0, "bussines_id");
- new firma = -1;
- if( PlayerInfo[ playerid ][ xBussinesSqlID ] != 0 ) {
- for( new i = 1; i < MAX_BUSSINES; i++ ) {
- if( BusinessInfo[ i ][ b_ID ] == fsqlID && BusinessInfo[ i ][ b_ID ] > 0 ) {
- firma = i;
- break;
- }
- }
- }
- new property_1 = cache_get_field_content_int(0, "property_id_1");
- new property_2 = cache_get_field_content_int(0, "property_id_2");
- new property_3 = cache_get_field_content_int(0, "property_id_3");
- new bank_money = cache_get_field_content_int(0, "xBRacun");
- new osqlID = cache_get_field_content_int(0, "org_id");
- new OrgID = -1;
- for( new id = 1; id < MAX_ORG; id++)
- {
- if( org_info[ id ][ oID ] == osqlID && org_info[ id ][ oID ] > 0 )
- {
- OrgID = id;
- break;
- }
- }
- new ban_id = cache_get_field_content_int(0, "ban_id");
- new ban_reason[ 64 ] ,ban_string[ 5 ];
- if( ban_id > 0 )
- {
- ban_string = "Da";
- cache_get_field_content( 0, "ban_reason", ban_reason, mSQL, 64 );
- }
- else
- {
- ban_string = "Ne";
- ban_reason = "Prazno";
- }
- SCMF(playerid, 0xC395EAFF, "*** NOVAC IGRACA - %s ***", imeigraca);
- SCMF(playerid, 0xFFFFFFAA, "Novac: [%d$] | Banka: [%d$]", novac, bank_money);
- if( OrgID != -1 ) SCMF(playerid, 0xFFFFFFAA, "Novac u organizaciji [%d$] [%s]", org_info[ OrgID ][ oSafeMoney ], getOrgName( OrgID ));
- if( property_1 != -1 ) SCMF(playerid, 0xF0F0F0FF, "Novac u imovini 1 [%d$] ID:%d", II[ property_1 ][ iMoney ], property_1);
- if( property_2 != -1 ) SCMF(playerid, 0xF0F0F0FF, "Novac u imovini 1 [%d$] ID:%d", II[ property_2 ][ iMoney ], property_2);
- if( property_3 != -1 ) SCMF(playerid, 0xF0F0F0FF, "Novac u imovini 1 [%d$] ID:%d", II[ property_3 ][ iMoney ], property_3);
- if( firma != -1 ) SCMF(playerid, 0xF0F0F0FF, "Novac u firmi [%d$] ID:%d", BusinessInfo[ firma ][ bMoney ], firma);
- SCMF( playerid, 0xF0F0F0FF, "Banovan: %s | Razlog: %s", ban_string, ban_reason );
- }
- return(true);
- }
- protected CheckPlayerOffStats( playerid, imeigraca[] )
- {
- new rows, fields;
- cache_get_data( rows, fields, mSQL );
- if( !rows )
- {
- SendErrorMessage( playerid, "Taj igrac ne postoji u bazi podataka!");
- }
- else
- {
- new pol = cache_get_field_content_int(0, "sex");
- new godine = cache_get_field_content_int(0, "age");
- new novac = cache_get_field_content_int(0, "money");
- new level = cache_get_field_content_int(0, "level");
- new exp = cache_get_field_content_int(0, "exp");
- new fsqlID = cache_get_field_content_int(0, "bussines_id");
- new firma = -1;
- if( PlayerInfo[ playerid ][ xBussinesSqlID ] != 0 )
- {
- for( new i = 1; i < MAX_BUSSINES; i++ )
- {
- if( BusinessInfo[ i ][ b_ID ] == fsqlID )
- {
- firma = i;
- break;
- }
- }
- }
- new posao = cache_get_field_content_int(0, "job_id");
- new ugovor = cache_get_field_content_int(0, "contract");
- new property_1 = cache_get_field_content_int(0, "property_id_1");
- new property_2 = cache_get_field_content_int(0, "property_id_2");
- new property_3 = cache_get_field_content_int(0, "property_id_3");
- new bank_money = cache_get_field_content_int(0, "xBRacun");
- new onlinesati = cache_get_field_content_int(0, "xOnlineSati");
- new admin_level = cache_get_field_content_int(0, "admin_lvl");
- new helper_level = cache_get_field_content_int(0, "helper_level");
- new warns = cache_get_field_content_int(0, "warn");
- new mail_e[ 128 ];
- cache_get_field_content( 0, "email", mail_e, mSQL, 128 );
- new staff_min = cache_get_field_content_int(0, "staff_min");
- new lastlogin[ 64 ];
- cache_get_field_content( 0, "last_login", lastlogin, mSQL, 64 );
- new regdate[ 64 ];
- cache_get_field_content( 0, "reg_date", regdate, mSQL, 64 );
- new rank = cache_get_field_content_int(0, "memb_rank");
- new osqlID = 0, OrgID = 0;
- osqlID = cache_get_field_content_int( 0, "org_id" );
- if( osqlID != 0 )
- {
- for( new id = 1; id < MAX_ORG; id++)
- {
- if( org_info[ id ][ oID ] == osqlID )
- {
- OrgID = id;
- break;
- }
- }
- }
- new ban_id = cache_get_field_content_int(0, "ban_id");
- new ban_reason[ 64 ] ,ban_string[ 5 ];
- if( ban_id > 0 )
- {
- ban_string = "Da";
- cache_get_field_content( 0, "ban_reason", ban_reason, mSQL, 64 );
- }
- else
- {
- ban_string = "Ne";
- ban_reason = "Prazno";
- }
- new pol_name[ 7 ];
- if( pol == 1 ) pol_name = "musko";
- else if( pol== 2 ) pol_name = "zensko";
- new nxtlevel = level+1,
- expamount = nxtlevel*levelexp;
- SCMF(playerid, 0xC395EAFF, "*** %s ***", imeigraca);
- SCMF(playerid, 0xFFFFFFAA, "Pol [%s] | Level:[%d] | Sati Igranja:[%d]", pol_name, level, onlinesati);
- SCMF(playerid, 0xFFFFFFAA, "Respekt:[%d/%d] | Novac: [%d$] | Banka: [%d$]", exp, expamount, novac, bank_money);
- SCMF(playerid, 0xFFFFFFAA, "Upozorenja: [%d/3] | Posao: [%s] | Posao ugovor: [%d/1]", warns, getJobName( posao ), ugovor);
- SCMF(playerid, 0xFFFFFFAA, "Godine: [%d] | Organizacija: [%s] | Rank: [%d]", godine, getOrgName( OrgID ), rank);
- SCMF(playerid, 0xF0F0F0FF, "Kljuc Imovine1 [%d] | Kljuc Imovine2 [%d] | Kljuc Imovine3 [%d]", property_1, property_2, property_3);
- SCMF(playerid, 0xF0F0F0FF, "Kljuc Firme [%d]", firma);
- SCMF(playerid, 0xF0F0F0FF, "Admin [%d] | HELPER [%d]", admin_level, helper_level );
- SCMF(playerid, 0xF0F0F0FF, "Aktivnost igraca u staff timu: %d minuta", staff_min );
- SCMF(playerid, 0xF0F0F0FF, "Banovan: %s | Razlog: %s", ban_string, ban_reason );
- SCMF(playerid, 0xF0F0F0FF, "Zadnja aktivnost: %s | Datum registracije: %s", lastlogin, regdate );
- SendClientMessage(playerid, 0xF0F0F0FF, "Da proverite vozila offline igraca: /(opv)offplayerveh." );
- }
- return(true);
- }
- protected CheckPlayerOffOrgKick( type, OrgID, playerid, imeigraca[] )
- {
- new rows, fields;
- cache_get_data( rows, fields, mSQL );
- if( !rows )
- {
- SendErrorMessage( playerid, "Taj igrac ne postoji u bazi podataka!");
- }
- else
- {
- new user_id = cache_get_field_content_int( 0, "user_id" );
- new mail_e[ 128 ];
- cache_get_field_content( 0, "email", mail_e, mSQL, 128 );
- new done = 0;
- for( new i = 0; i < org_info[ OrgID ][ oMaxClanova ]+1; i++ )
- {
- if( strcmp( imeigraca, org_members_info[ OrgID ][ i ][ o_m_Name ], true ) == 0 )
- {
- strmid( org_members_info[ OrgID ][ i ][ o_m_Name ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME );
- org_members_info[ OrgID ][ i ][ o_m_sqlID ] = 0;
- org_members_info[ OrgID ][ i ][ o_m_type ] = 0;
- done = 1;
- break;
- }
- }
- if( done == 0 ) return SendErrorMessage( playerid, "Taj clan nije u tvojoj orgi." );
- if( type == 0 ) org_info[ OrgID ][ oUbacenihClanova ]--;
- sql_org_member_delete( org_info[ OrgID ][ oID ], user_id );
- new q[ 256 ];
- mysql_format( mSQL, q, sizeof(q), "UPDATE `users` SET `skin_id` = '%d', `spawn` = '0', `org_contract` = '0', `org_punishment` = '0' WHERE `user_id` = '%d'", MALE_SKIN, user_id );
- mysql_tquery( mSQL, q );
- if( type == 0 )
- {
- SendInfoMessage( playerid, "Izbacili ste igraca %s iz organizacije %s", imeigraca, org_info[ OrgID ][ oName ] );
- #if MAILER_ENABLED == 1
- new string[ 256 ];
- format( string, sizeof( string ), "Postovani %s, izbaceni ste iz organizacije na nasem SA:MP serveru.\nOrganizacija: %s.\n \
- Ukoliko mislite da je greska, podnesite zalbu na forumu: www.v-rp.info/forum.\n\n\n \
- Sa postovanjem, V Administracija.", imeigraca, org_info[ OrgID ][ oName ] );
- SendMail( mail_e, "[email protected]", "V Administracija", "V - BAN", string );
- #endif
- }
- else if( type == 1 ) {
- SendInfoMessage( playerid, "Izbacili ste lidera %s iz organizacije %s", imeigraca, org_info[ OrgID ][ oName ] );
- #if MAILER_ENABLED == 1
- new string[ 256 ];
- format( string, sizeof( string ), "Postovani %s, skinuto vam je vodjstvo organizacije na nasem SA:MP serveru.\nOrganizacija: %s.\n \
- Ukoliko mislite da je greska, podnesite zalbu na forumu: www.v-rp.info/forum.\n\n\n \
- Sa postovanjem, V Administracija.", imeigraca, org_info[ OrgID ][ oName ] );
- SendMail( mail_e, "[email protected]", "V Administracija", "V - BAN", string );
- #endif
- }
- }
- return(true);
- }
- protected CheckPlayerOffBan( reason[], playerid, imeigraca[] )
- {
- new rows, fields;
- cache_get_data( rows, fields, mSQL );
- if( !rows ) {
- SendErrorMessage( playerid, "Taj igrac ne postoji u bazi podataka!");
- }
- else {
- new user_id = cache_get_field_content_int( 0, "user_id" );
- new mail_e[ 128 ];
- cache_get_field_content( 0, "email", mail_e, mSQL, 128 );
- PlayerInfo[ playerid ][ xTBan ]++;
- sql_user_update_integer( playerid, "xTBan", PlayerInfo[ playerid ][ xTBan ] );
- ServerInfo[ BanovanihKorisnika ]++;
- #if MAILER_ENABLED == 1
- new string[ 256 ];
- format( string, sizeof( string ), "Postovani %s, banovani ste sa naseg SA:MP servera.\nRazlog: %s.\n \
- Ukoliko vi niste trazili promenu lozinke, podnesite zalbu na forumu: www.v-rp.info/forum.\n\n\n \
- Sa postovanjem, V Administracija.", imeigraca, reason );
- SendMail( mail_e, "[email protected]", "V Administracija", "V - BAN", string );
- #endif
- format( globalstring, sizeof( globalstring ), "[ADMIN] %s je offbanovao igraca %s, razlog: %s.", ImeIgraca( playerid ), imeigraca, reason );
- AdminPoruka( ADM_WARN, globalstring );
- sql_ban_user( imeigraca, user_id, 1, reason, ImeIgraca( playerid ) );
- new string1[ 128 ];
- format( string1, sizeof( string1 ), "Admin %s je offbanovao igraca %s | Razlog: %s", ImeIgraca( playerid ), imeigraca, reason );
- LogSave( "Logovi/LogOffBan.log", string1 );
- }
- return(true);
- }
- protected CheckPlayerBan( playerid )
- {
- new rows, fields;
- cache_get_data( rows, fields, mSQL );
- if( !rows )
- {
- defer Login(playerid);
- }
- else
- {
- new user_id, ban_type;
- user_id = cache_get_field_content_int( 0, "user_id" );
- ban_type = cache_get_field_content_int( 0, "ban_type" );
- if( ban_type == 1 )
- {
- new ban_reason[ 64 ], ban_date[ 64 ], ban_admin[ MAX_PLAYER_NAME ];
- cache_get_field_content( 0, "ban_reason", ban_reason, mSQL, 150 );
- cache_get_field_content( 0, "ban_date", ban_date, mSQL, 150 );
- cache_get_field_content( 0, "ban_admin", ban_admin, mSQL, 150 );
- if( user_id == PlayerInfo[ playerid ][ xID ] )
- {
- SCMF( playerid, -1, "%s, banovani ste sa ovog servera.", ImeIgraca( playerid ) );
- SendClientMessage( playerid, -1, "Vas ban {C395EA}nece isteci." );
- SCMF( playerid, -1, "Vreme i datum bana: {C395EA}%s.", ban_date );
- SCMF( playerid, -1, "Razlog bana: {C395EA}%s.", ban_reason );
- SCMF( playerid, -1, "Admin koji vas je banovao: {C395EA}%s.", ban_admin );
- SendClientMessage( playerid, -1, "Ukoliko mislis da je ovo greska.");
- SendClientMessage( playerid, -1, "Zahtev za unban mozes traziti na {C395EA}forumu.");
- SendClientMessage( playerid, -1, "Forum: {C395EA}www.v-rp.info");
- defer KickIgraca(playerid);
- return(true);
- }
- else Login(playerid);
- }
- else if( ban_type == 2 )
- {
- new ban_reason[ 64 ], ban_date[ 64 ], ban_admin[ MAX_PLAYER_NAME ];
- cache_get_field_content( 0, "ban_reason", ban_reason, mSQL, 150 );
- cache_get_field_content( 0, "ban_date", ban_date, mSQL, 150 );
- cache_get_field_content( 0, "ban_admin", ban_admin, mSQL, 150 );
- new ban_time = cache_get_field_content_int( 0, "ban_time" );
- if( ban_time > 0 )
- {
- new datetime[ 6 ];
- TimestampToDate( ban_time, datetime[ 0 ], datetime[ 1 ], datetime[ 2 ], datetime[ 3 ], datetime[ 4 ], datetime[ 5 ], 1 );
- if( gettime( ) < ban_time )
- {
- SCMF( playerid, 0xC395EAFF, "%s, {FFFFFF}banovan si sa ovog servera.", ImeIgraca( playerid ) );
- SCMF( playerid, -1, "Vas ban istice: {C395EA}%02d/%02d/%d - %d/%d/%d{FFFFFF}.", datetime[ 2 ], datetime[ 1 ], datetime[ 0 ], datetime[ 3 ], datetime[ 4 ], datetime[ 5 ] );
- SCMF( playerid, -1, "Vreme i datum bana: {C395EA}%s.", ban_date );
- SCMF( playerid, -1, "Razlog bana: {C395EA}%s.", ban_reason );
- SCMF( playerid, -1, "Admin koji vas je banovao: {C395EA}%s.", ban_admin );
- SendClientMessage( playerid, -1, "Ukoliko mislis da je ovo greska.");
- SendClientMessage( playerid, -1, "Zahtev za unban mozes traziti na {C395EA}forumu.");
- SendClientMessage( playerid, -1, "Forum: {C395EA}www.v-rp.info");
- defer KickIgraca(playerid);
- return(true);
- }
- else
- {
- sql_user_unban( PlayerInfo[ playerid ][ xID ] );
- Login(playerid);
- }
- }
- else
- {
- sql_user_unban( PlayerInfo[ playerid ][ xID ] );
- Login(playerid);
- }
- }
- }
- return(true);
- }
- public OnPlayerDisconnect( playerid, reason )
- {
- if( IsValidDynamicMapIcon( PlayerGpsRadar[ playerid ][ _pgrIconId ] ) ) DestroyDynamicMapIcon( PlayerGpsRadar[ playerid ][ _pgrIconId ] );
- if( IsValidDynamicObject( PlayerGpsRadar[ playerid ][ _pgrObject ] ) ) DestroyDynamicObject( PlayerGpsRadar[ playerid ][ _pgrObject ] );
- if( IsValidDynamicCP( PlayerGpsRadar[ playerid ][ _pgrCheckPointId ] ) ) DestroyDynamicCP( PlayerGpsRadar[ playerid ][ _pgrCheckPointId ] );
- new q[ 128 ], km, mm, sqlID;
- for( new j = 0; j < MAX_VEH_SLOT; j ++ )
- {
- if( (j+1) <= PlayerInfo[ playerid ][ xSlotoviVozila ] && player_veh[ playerid ][ vehicle_id ][ j ] != -1 )
- {
- new vehicleid = player_veh[ playerid ][ vehicle_id ][ j ];
- if( vehicleid != -1 )
- {
- km = VehicleInfo[ vehicleid ][ vKilometri ];
- mm = VehicleInfo[ vehicleid ][ vMetri ];
- sqlID = VehicleInfo[ vehicleid ][ vSqlID ];
- mysql_format( mSQL, q, sizeof(q), "UPDATE `vehicles` SET `v_kilometri` = '%d', `v_metri` = '%d' WHERE `veh_id` = '%d' LIMIT 1", km, mm, sqlID );
- mysql_tquery( mSQL, q );
- ResetVehicle( vehicleid );
- v_DestroyVehicle( vehicleid );
- }
- }
- }
- if( IgracNosiPaket[ playerid ] && ( GetFactionType( playerid ) == ORG_TIP_MAFIJA || GetFactionType( playerid ) == ORG_TIP_BANDA ) ) {
- new OrgID = PlayerInfo[ playerid ][ xClan ];
- v_DisablePlayerCheckpoint( playerid );
- CheckpointStatus[ playerid ] = 0;
- RemovePlayerAttachedObject( playerid, OBJECT_SLOT_ORG );
- IgracNosiPaket[ playerid ] = false;
- ServerInfo[ PaketNijeNaSvomMestu ] = true;
- new Float:Pos[ 3 ];
- GetPlayerPos( playerid, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] );
- if( IsValidDynamicPickup( ServerInfo[ PaketPickup ] ) )
- DestroyDynamicPickup( ServerInfo[ PaketPickup ] );
- ServerInfo[ PaketVreme ] = 3;
- ServerInfo[ PaketPickup ] = CreateDynamicPickup( 328, 1, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ], 0, 0 );
- new stringzone[ MAX_ZONE_NAME ];
- format( stringzone, sizeof( stringzone ), "%s", GetPlayerLocation( playerid ) );
- foreach( new i : Player )
- {
- if( GetFactionType( i ) == ORG_TIP_MAFIJA || GetFactionType( i ) == ORG_TIP_BANDA || PlayerInfo[ i ][ xAdmin ] > 0 || PlayerInfo[ i ][ xTestAdmin ] > 0 )
- {
- SCMF( i, ZUTA, "(PAKET): Igracu {CCCCCC}%s(%s) {FFFF00}je ispao paket.", RPImeIgraca( playerid ), org_info[ OrgID ][ oPreFix ] );
- SCMF( i, ZUTA, "(PAKET): Lokacija: {FFFFFF}%s.", stringzone );
- SendClientMessage( i, ZUTA, "(PAKET): Ukoliko niko ne pokupi paket narednih 10 minuta, paket ce nestati." );
- }
- }
- ServerInfo[ PaketTimer ] = defer DestroyPaket();
- }
- if( IsPlayerInAnyVehicle( playerid ) )
- {
- new Float:x, Float:y, Float:z, vehicleid = GetPlayerVehicleID(playerid);
- GetVehiclePos( vehicleid,x, y, z );
- RealVehiclePositions[ vehicleid ][ 0 ] = x;
- RealVehiclePositions[ vehicleid ][ 1 ] = y;
- RealVehiclePositions[ vehicleid ][ 2 ] = z;
- }
- antiCheatCS[ playerid ][ CPSCount ] = 0;
- antiCheatCS[ playerid ][ CPSTick ] = 0;
- antiCheatCS[ playerid ][ CWTime ] = 0;
- antiCheatCS[ playerid ][ CWVehID ] = -1;
- if( SearchNadji[ playerid ] != -1 )
- {
- SearchNadji[ playerid ] = -1;
- v_DisablePlayerCheckpoint( playerid);
- }
- if( tdm_player_info[ playerid ][ tdm_Team ] != 0 )
- {
- for( new i = 0; i < 5; i ++) TextDrawHideForPlayer( playerid, TDM_gTD[ i ] );
- PlayerTextDrawHide( playerid, TDMplayerScore_pTD[ playerid ] );
- PlayerTextDrawDestroy( playerid, TDMplayerScore_pTD[ playerid ] );
- TDMplayerScore_pTD[ playerid ] = PlayerText:INVALID_TEXT_DRAW;
- }
- #if ZIMSKI_MOD == 1
- if( Snow[ playerid ] ) DestroyPlayerObject( playerid, SnowObject[ playerid ] );
- #endif
- if( (EventInfo[ ec_Started ] > 0 || EventInfo[ wot_Started ] > 0 || EventInfo[ db_Started ] > 0 || EventInfo[ ebc_Started ] > 0) && PlayerInvited[ playerid ] > 0 )
- {
- EventInfo[ Drivers ]--;
- if(EventInfo[ Vehicle ][ PlayerEventVehID[ playerid ] ] != -1) SetVehicleToRespawn( EventInfo[ Vehicle ][ PlayerEventVehID[ playerid ] ] );
- PlayerInvited[ playerid ] = 0;
- if(EventInfo[ Vehicle ][ PlayerEventVehID[ playerid ] ] != -1) PlayerEventVehID[ playerid ] = -1;
- if(EventInfo[ Drivers ] == 1)
- {
- foreach(new i : Player)
- {
- if(PlayerInvited[i] == 1)
- {
- PlayerInfo[ i ][ xEvent1Mesto ]++;
- sql_user_update_integer( i, "event_first_place", PlayerInfo[ i ][ xEvent1Mesto ] );
- DajIgracuNovac( i, 10000 );
- format( globalstring, 128, "(EVENT - CRASH): Pobjednik eventa je {FFFFFF}%s. {6EF83C}| Nagrada: {FFFFFF}($10000).", ImeIgraca( i ) );
- SendClientMessageToAll( 0x6EF83CFF, globalstring );
- SetPlayerVirtualWorld( i, 0 );
- v_TogglePlayerControllable( i, true );
- DisablePlayerCheckpoint( i );
- v_SetPlayerPos( i, PlayerPos[ i ][ 0 ], PlayerPos[ i ][ 1 ], PlayerPos[ i ][ 2 ] );
- SetPlayerVirtualWorld( i, PlayerPosVW[ i ] );
- return(true);
- }
- else if(PlayerInvited[i] == 2)
- {
- PlayerInfo[ i ][ xEvent1Mesto ]++;
- sql_user_update_integer( i, "event_first_place", PlayerInfo[ i ][ xEvent1Mesto ] );
- DajIgracuNovac( i, 10000 );
- format( globalstring, 128, "(EVENT - WORLD OF TANKS): Pobjednik eventa je {FFFFFF}%s. {6EF83C}| Nagrada: {FFFFFF}($10000).", ImeIgraca( i ) );
- SendClientMessageToAll( 0x6EF83CFF, globalstring );
- SetPlayerVirtualWorld( i, 0 );
- v_TogglePlayerControllable( i, true );
- DisablePlayerCheckpoint( i );
- v_SetPlayerPos( i, PlayerPos[ i ][ 0 ], PlayerPos[ i ][ 1 ], PlayerPos[ i ][ 2 ] );
- SetPlayerVirtualWorld( i, PlayerPosVW[ i ] );
- return(true);
- }
- else if(PlayerInvited[i] == 5)
- {
- PlayerInfo[ i ][ xEvent1Mesto ]++;
- sql_user_update_integer( i, "event_first_place", PlayerInfo[ i ][ xEvent1Mesto ] );
- DajIgracuNovac( i, 10000 );
- format( globalstring, 128, "(EVENT - DERBY): Pobjednik eventa je {FFFFFF}%s. {6EF83C}| Nagrada: {FFFFFF}($10000).", ImeIgraca( i ) );
- SendClientMessageToAll( 0x6EF83CFF, globalstring );
- SetPlayerVirtualWorld( i, 0 );
- v_TogglePlayerControllable( i, true );
- DisablePlayerCheckpoint( i );
- v_SetPlayerPos( i, PlayerPos[ i ][ 0 ], PlayerPos[ i ][ 1 ], PlayerPos[ i ][ 2 ] );
- SetPlayerVirtualWorld( i, PlayerPosVW[ i ] );
- return(true);
- }
- }
- }
- }
- if( PlayerInBlowJob[ playerid ] != 0 )
- {
- switch( PlayerInBlowJob[ playerid ] )
- {
- case 1:
- {
- DestroyDynamicActor( Sex_Lisa );
- WhoreLisa = false;
- }
- case 2:
- {
- DestroyDynamicActor( Sex_Angelina );
- WhoreAngelina = false;
- }
- case 3:
- {
- DestroyDynamicActor( Sex_Mia );
- WhoreMia = false;
- }
- case 4:
- {
- DestroyDynamicActor( Sex_Sendy );
- WhoreSendy = false;
- }
- }
- StopAudioStreamForPlayer( playerid );
- SetCameraBehindPlayer( playerid );
- PlayerInBlowJob[ playerid ] = 0;
- SexTDControl( playerid, false );
- BlowJobCount[ playerid ] = 0;
- TogPlayerHud( playerid );
- v_TogglePlayerControllable( playerid, ( true ) );
- ClearAnimations( playerid );
- stop PusenjeTimer[playerid];
- }
- switch( reason )
- {
- case 0:
- {
- format( globalstring, sizeof( globalstring ), "** (( %s je napustio server (crash) ))", ImeIgraca( playerid ) );
- PorukaRadius( 60.0 , playerid, globalstring, 0xBFC0C2FF );
- }
- case 1:
- {
- format( globalstring, sizeof( globalstring ), "** (( %s je napustio server (disconnect) ))", ImeIgraca( playerid ) );
- PorukaRadius( 60.0 , playerid, globalstring, 0xBFC0C2FF );
- }
- }
- if(PoliceComputer[playerid])
- {
- Police_TVTDControl( playerid, false );
- PoliceComputer[playerid] = false;
- }
- DestroyPlayerTextDraws( playerid );
- if( AdminVozilo[ playerid ] != -1 ) VehicleInfo[ AdminVozilo[ playerid ] ][ Validv3DText ] = false, DestroyDynamic3DTextLabel(VehicleInfo[ AdminVozilo[ playerid ] ][ v3DText ]), v_DestroyVehicle( AdminVozilo[ playerid ] ), ResetVehicle( AdminVozilo[ playerid ] ), AdminVozilo[ playerid ] = -1;
- if( VipVozilo[ playerid ] != -1 ) VehicleInfo[ VipVozilo[ playerid ] ][ Validv3DText ] = false, DestroyDynamic3DTextLabel(VehicleInfo[ VipVozilo[ playerid ] ][ v3DText ]), v_DestroyVehicle( VipVozilo[ playerid ] ), ResetVehicle( VipVozilo[ playerid ] ), VipVozilo[ playerid ] = -1;
- if( PosaoVozilo[ playerid ] != -1 ) VehicleInfo[ PosaoVozilo[ playerid ] ][ Validv3DText ] = false, DestroyDynamic3DTextLabel(VehicleInfo[ PosaoVozilo[ playerid ] ][ v3DText ]), v_DestroyVehicle( PosaoVozilo[ playerid ] ), ResetVehicle( PosaoVozilo[ playerid ] ), PosaoVozilo[ playerid ] = -1;
- if( PosaoTrailer[ playerid ] != -1 ) VehicleInfo[ PosaoTrailer[ playerid ] ][ Validv3DText ] = false, DestroyDynamic3DTextLabel(VehicleInfo[ PosaoTrailer[ playerid ] ][ v3DText ]), v_DestroyVehicle( PosaoTrailer[ playerid ] ), ResetVehicle( PosaoTrailer[ playerid ] ), PosaoTrailer[ playerid ] = -1;
- if( TrkaVozilo[ playerid ] != -1 ) v_DestroyVehicle( TrkaVozilo[ playerid ] ), ResetVehicle( TrkaVozilo[ playerid ] ), TrkaVozilo[ playerid ] = -1;
- if( RentVozilo[ playerid ] != -1 )
- {
- stop RentTimer[playerid];
- VehicleObjectCheck( RentVozilo[ playerid ] ), VehicleInfo[ RentVozilo[ playerid ] ][ Validv3DText ] = false, DestroyDynamic3DTextLabel(VehicleInfo[ RentVozilo[ playerid ] ][ v3DText ]), ResetVehicle( RentVozilo[ playerid ] ), v_DestroyVehicle( RentVozilo[ playerid ] ), RentVozilo[ playerid ] = -1;
- }
- if( HitmanInfo[ playerid ][ GotHit ] > 0)
- {
- if( HitmanInfo[ playerid ][ GetChased ] < 999 )
- {
- if( IsPlayerConnected( HitmanInfo[ playerid ][ GetChased ] ) )
- {
- SendClientMessage( HitmanInfo[ playerid ][ GetChased ], ZUTA, "(CONTRACT): Vasa meta je izasla sa servera." );
- HitmanInfo[ HitmanInfo[ playerid ][ GetChased ] ][ GoChase ] = 999;
- }
- }
- }
- if( IDVozilaKojimSverca[ playerid ] != -1 ) KutijaMatsa[ IDVozilaKojimSverca[ playerid ] ] = false;
- if( PljackaVreme[ playerid ] > 0 )
- {
- stop PljackanjeBankeTimer[ playerid ];
- PljackaUToku = false;
- }
- PljackaNovac[ playerid ] = 0, PljackaVreme[ playerid ] = 0;
- if( ZlatoVreme[ playerid ] > 0 )
- {
- stop PljackanjeZlatareTimer[playerid];
- ZlataraUToku = false;
- }
- PljackaZlato[ playerid ] = 0;
- ZlatoVreme[ playerid ] = 0;
- ToggedPM[playerid] = false;
- ToggedWISP[playerid] = false;
- ToggedReport[playerid] = false;
- ToggedFR[playerid] = false;
- ToggedDC[playerid] = false;
- GovRepairCooldown[playerid] = 0;
- RequestingBackup[playerid] = false;
- CuffTimerCalled[playerid] = false;
- PokusajProvala[playerid] = false;
- TicketOffer[playerid] = -1;
- TicketMoney[playerid] = 0;
- ShakeOffer[playerid] = -1;
- RecoverOffer[playerid] = -1;
- RecoverMoney[playerid] = 0;
- MedicineOffer[playerid] = -1;
- MedicineMoney[playerid] = 0;
- TalkingLive[playerid] = -1;
- TalkingOffer[playerid] = -1;
- LiveOffer[playerid] = -1;
- Mobile[playerid] = -1;
- CellTime[playerid] = 0;
- CallCost[playerid] = 0;
- PlayerDruggedSeconds[playerid] = 0;
- NoFuel[playerid] = false;
- LocatingCar[playerid] = false;
- GPSTimerCalled[playerid] = false;
- StartingVehicle[playerid] = false;
- PoliceComputer[playerid] = false;
- JobDuty[playerid] = false;
- ImmobTimerCalled[playerid] = false;
- OfficerUndercover[playerid] = false;
- ToggedAnim[playerid] = false;
- gSmoking[playerid] = 0;
- BreakingVehicle[playerid] = -1;
- BreakLockTimerCalled[playerid] = 0;
- BreakingLock[playerid] = 0;
- breaksecounds[playerid] = 0;
- immobsecounds[playerid] = 0;
- if( DragedPlayerID[ playerid ] != -1 )
- {
- SendInfoMessage( DragedPlayerID[ playerid ], "%s je napustio server, pusteni ste.", ImeIgraca( playerid ) );
- v_TogglePlayerControllable( DragedPlayerID[ playerid ], true );
- Draged[ DragedPlayerID[ playerid ] ] = -1;
- }
- if( PitanjeBroj[ playerid ] != 0 ) stop pitanje_[playerid];
- stop _progressatmbar[playerid];
- if( PocetniTutorialStartovan[ playerid ] == true )
- {
- stop pocetni_tut[playerid];
- }
- if( PlayerInfo[ playerid ][ xPosao ] == POSAO_MEHANICAR )
- {
- if(JobDuty[playerid]) Mechanics -= 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment