Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Plugin antiroxx:source 3.8 (zz1crazyxx & MorgenDavid)
- plugin de diminution des degats en fonction du niveau des joueurs.(classement par ratio)
- systeme de protection des joueurs tres faible (luciolle)
- */
- /*
- // La table stock le ratio des joueurs sous forme kill/death
- // Ip et lastconnected juste pour info.
- // Si plx=x le joueur peut se co sans risque d'etre redirige x=1 low, x=2 high , x=3 les deux.
- CVars:
- * antiroxx_active" (default:"1") "(Des)active antiroxx"
- * antiroxx_minimum_player" (default:"1") "Nbres Joueurs minimum pour etre actif"
- * antiroxx_serveur (default:"0") "0 = Normal | 1 = Serveur Low (kick/redirige si trop fort): 2 = Serveur High (kick/redirige si trop faible)"
- * antiroxx_ratio_auth (default:"1.00") "Si 'Serveur Low' alors ratio maximum avant kick | Si 'Serveur High':ratio minimum sinon kick"
- * antiroxx_new_server" (default:"127.0.0.1:27015") "Ip du serveur vers lequel on redirigera le joueur (Serveur Low/High)."
- * antiroxx_max_cumul" (default:"80") "Nombre de frags ou deaths limite, on divise par 2 une fois cette limite atteinte."
- * antiroxx_ratio_snipe" (default:"1.00") "A partir de ce ratio: on a plus le droit aux snipes (except scout)"
- * antiroxx_ratio_flash" (default:"1.00") "A partir de ce ratio: on a plus le droit aux flash (a l'achat)"
- * antiroxx_frags_default" (default:"8") "Nombre de frag donné a chaque joueur a la premiere connection"
- * antiroxx_deaths_default" (default:"10") "Nombre de morts donne a chaque joueur a la premiere connection"
- Commande:
- * Liste des ratios des joueurs: sm_antiroxx
- * Modifier le ratio d'un joueurs: sm_antiroxx <name|#userid> <frag> <death>
- Inclut:
- * Simple Anti AFK.
- * 15000 a chaque round.
- */
- #pragma semicolon 1
- #include <sourcemod>
- #include <cstrike>
- #include <sdktools>
- #include <sdkhooks>
- #include <colors>
- // --------------------------------------------------------------------------------------------------------
- // Les definitions.
- // (Ne pas toucher sans une bonne raison)
- // --------------------------------------------------------------------------------------------------------
- #define PL_VERSION "3.8"
- #define GAME_CSS 1
- #define GAME_CSGO 2
- #define MAX_AUTHID_LENGTH 20
- #define RATIO_LUCIOLE -0.07+RATIO_JUNIOR
- #define RATIO_JUNIOR -0.11+RATIO_DEBUTANT
- #define RATIO_DEBUTANT -0.11+RATIO_DEBUTANT_PLUS
- #define RATIO_DEBUTANT_PLUS -0.11+RATIO_CONFIRME
- #define RATIO_CONFIRME 1.00
- #define RATIO_CONFIRME_PLUS 0.07+RATIO_CONFIRME
- #define RATIO_AVANCE 0.07+RATIO_CONFIRME_PLUS
- #define RATIO_AVANCE_PLUS 0.07+RATIO_AVANCE
- #define RATIO_PRO 0.07+RATIO_AVANCE_PLUS
- #define RATIO_PRO_PLUS 0.07+RATIO_PRO
- #define RATIO_PGM 0.15+RATIO_PRO_PLUS
- #define START_MONEY 15000
- #define HP_LUCIOLE 200
- #define HP_JUNIOR 150
- #define HP_PGM_CSS 500
- #define HP_PGM_CSGO 200
- #define HANDICAP 0.7
- #define GROUP_SNIPE 5
- #define GROUP_FLASH 6
- #define GROUP_WORLD 7
- #define GROUP_OTHERS 0
- // --------------------------------------------------------------------------------------------------------
- //- Infos Plugins
- // --------------------------------------------------------------------------------------------------------
- public Plugin:myinfo =
- {
- name = "Antiroxx:Source",
- author = "zz1crazyxx & MorgenDavid",
- description = "Plugins d'aide aux nouveaux joueurs",
- version = PL_VERSION,
- url = ""
- }
- // --------------------------------------------------------------------------------------------------------
- //- Variables
- // --------------------------------------------------------------------------------------------------------
- new Player_Frags[MAXPLAYERS+1];
- new Player_Deaths[MAXPLAYERS+1];
- new Float:Player_Ratio[MAXPLAYERS+1];
- new isPlayerLuciole[MAXPLAYERS+1];
- new isPlayerPgm[MAXPLAYERS+1];
- new isPunished[MAXPLAYERS+1];
- new plx[MAXPLAYERS+1];
- new bool:isConfigDownload[MAXPLAYERS+1];
- new Handle:hDatabase = INVALID_HANDLE;
- new TimePlayed[MAXPLAYERS+1];
- new Handle:g_hAfkCheckSpawn[MAXPLAYERS+1] = INVALID_HANDLE;
- new Handle:g_hAfkCheckTimer[MAXPLAYERS+1] = INVALID_HANDLE;
- new Float:SpawnPos[MAXPLAYERS+1][3];
- new Float:CurrentPos[MAXPLAYERS+1][3];
- // new g_iAccount = -1;
- new Float:g_handicap = HANDICAP;
- new Handle:gServeur;
- new Handle:gActive;
- new Handle:gMinimumPly;
- new Handle:gMaxCumul;
- new Handle:gRatioAuth;
- new Handle:gNewServer;
- new gametype = -1;
- new bool:cvar_Active;
- new cvar_MinimumPly;
- new g_FreezeSprite;
- new Handle:gRatio_snipe;
- new Float:cvar_snipe;
- new Handle:gRatio_flash;
- new Float:cvar_flash;
- new Handle:gFrags_default;
- new Handle:gDeaths_default;
- // --------------------------------------------------------------------------------------------------------
- //- appelé quand le plugin démarre.
- // --------------------------------------------------------------------------------------------------------
- public OnPluginStart()
- {
- LoadTranslations ("antiroxx.phrases");
- new String:game_description[64];
- GetGameDescription(game_description, sizeof(game_description), true);
- if(StrContains(game_description, "Counter-Strike", false) != -1) { gametype = GAME_CSS; }
- if(StrContains(game_description, "Counter-Strike: Global Offensive", false) != -1) { gametype = GAME_CSGO; }
- if(gametype == -1) { SetFailState("Plugin for CS:S or CS:GO only"); }
- //CVar
- CreateConVar("antiroxx_version", PL_VERSION, "Antiroxx system", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY);
- gServeur = CreateConVar("antiroxx_serveur", "0", "0 = Normal | 1 = Low : 2 = High", _, true, 0.0, true, 2.0);
- gRatioAuth = CreateConVar("antiroxx_ratio_auth", "1.00", "Si 'Low' alors ratio maximum avant kick | Si 'High':ratio minimum sinon kick", _, true, RATIO_LUCIOLE, true, RATIO_PGM);
- gNewServer = CreateConVar("antiroxx_new_server", "127.0.0.1:27015", "Ip du serveur vers lequel on redirigera le joueur.", _);
- gActive = CreateConVar("antiroxx_active", "1", "(Des)active antiroxx", _, true, 0.0, true, 1.0);
- gMinimumPly = CreateConVar("antiroxx_minimum_player", "4", "Nbres Joueurs minimum pour etre actif", _, true, 1.0, true, 8.0);
- gMaxCumul = CreateConVar("antiroxx_max_cumul", "80", "Nombre de frags ou deaths limite, on divise par 2 une fois cette limite atteinte.", _, true, 60.0, true, 1000.0);
- gRatio_snipe = CreateConVar("antiroxx_ratio_snipe", "1.00", "A partir de ce ratio: on a plus le droit aux snipes", _, true, RATIO_LUCIOLE, true, RATIO_PGM);
- gRatio_flash = CreateConVar("antiroxx_ratio_flash", "1.00", "A partir de ce ratio: on a plus le droit aux flash", _, true, RATIO_LUCIOLE, true, RATIO_PGM);
- gFrags_default = CreateConVar("antiroxx_frags_default", "8", "Nombre de frag donné a chaque joueur a la premiere connection", _, true, 1.0, true, 100.0);
- gDeaths_default = CreateConVar("antiroxx_deaths_default", "10", "Nombre de morts donne a chaque joueur a la premiere connection", _, true, 1.0, true, 29.0);
- //Events
- HookEvent("item_pickup", Event_ItemPickup, EventHookMode_Pre);
- HookEvent("player_death", Event_PlayerDeath);
- HookEvent("player_hurt", Event_PlayerHurt, EventHookMode_Post);
- HookEvent("player_spawn", Event_PlayerSpawn);
- HookEvent("round_start", Event_RoundStart);
- HookEvent("round_end", Event_RoundEnd);
- // g_iAccount = FindSendPropOffs("CCSPlayer", "m_iAccount");
- //Commandes
- RegAdminCmd("sm_antiroxx", Antiroxx_List, ADMFLAG_BAN);
- AutoExecConfig(true, "antiroxx_source", "sourcemod");
- new String:error[255];
- if(SQL_CheckConfig("antiroxx"))
- {
- hDatabase = SQL_Connect( "antiroxx", true, error, sizeof(error));
- }
- else
- {
- // hDatabase=SQL_DefConnect( error, sizeof(error), true);
- new Handle:kv = INVALID_HANDLE;
- kv = CreateKeyValues("");
- KvSetString(kv, "driver", "mysql");
- KvSetString(kv, "database", "sourcebans");
- KvSetString(kv, "host", "149.202.65.147");
- KvSetString(kv, "port", "3306");
- KvSetString(kv, "user", "sbuser");
- KvSetString(kv, "pass", "obalX7bfLDeVEzdx");
- hDatabase = SQL_ConnectCustom(kv, error, sizeof(error), true);
- CloseHandle(kv);
- }
- if(hDatabase==INVALID_HANDLE)
- {
- PrintToServer("[ANTIROXX] Could not connect: %s", error);
- LogError("[ANTIROXX] Database failure: %s", error);
- }
- else
- {
- decl String:query[512];
- Format(query,sizeof(query), "%s%s%s%s%s%s%s%s%s%s%s",
- "CREATE TABLE IF NOT EXISTS `css_players` (",
- " `steamid` varchar(12) NOT NULL,",
- " `pseudo` tinytext,",
- " `frag` smallint(5) unsigned NOT NULL,",
- " `death` smallint(5) unsigned NOT NULL,",
- " `ip` varchar(15) DEFAULT NULL,",
- " `LastConnected` timestamp NULL DEFAULT NULL,",
- " `timeplayed` timestamp NOT NULL DEFAULT 0,",
- " `plx` tinyint(3) unsigned NOT NULL DEFAULT '0',",
- " PRIMARY KEY (`steamid`)",
- ") TYPE=InnoDB;");
- SQL_TQuery(hDatabase, SQLErrorCheckCallback, query);
- }
- if(GetConVarInt(gServeur)!=0) g_handicap -= 0.1;
- if(gametype == GAME_CSGO) g_handicap -= 0.2;
- }
- // --------------------------------------------------------------------------------------------------------
- //- Error Query
- // --------------------------------------------------------------------------------------------------------
- public SQLErrorCheckCallback(Handle:owner, Handle:hndl, const String:error[], any:data) {
- if(!StrEqual("", error)) {
- LogError("Query failed: %s", error);
- }
- }
- // --------------------------------------------------------------------------------------------------------
- //- Au chargement de la map
- // --------------------------------------------------------------------------------------------------------
- public OnMapStart()
- {
- if(gametype == GAME_CSS)
- {
- // tinkywinky_css
- AddFileToDownloadsTable("models/player/tinkywinky_css/tinkywinky_css.dx80.vtx");
- AddFileToDownloadsTable("models/player/tinkywinky_css/tinkywinky_css.dx90.vtx");
- AddFileToDownloadsTable("models/player/tinkywinky_css/tinkywinky_css.mdl");
- AddFileToDownloadsTable("models/player/tinkywinky_css/tinkywinky_css.phy");
- AddFileToDownloadsTable("models/player/tinkywinky_css/tinkywinky_css.sw.vtx");
- AddFileToDownloadsTable("models/player/tinkywinky_css/tinkywinky_css.vvd");
- AddFileToDownloadsTable("materials/models/player/tinkywinky_css/face.vmt");
- AddFileToDownloadsTable("materials/models/player/tinkywinky_css/face.vtf");
- AddFileToDownloadsTable("materials/models/player/tinkywinky_css/purple.vmt");
- AddFileToDownloadsTable("materials/models/player/tinkywinky_css/purple.vtf");
- AddFileToDownloadsTable("materials/models/player/tinkywinky_css/tv.vmt");
- AddFileToDownloadsTable("materials/models/player/tinkywinky_css/tv.vtf");
- AddFileToDownloadsTable("materials/models/player/tinkywinky_css/ear.vmt");
- AddFileToDownloadsTable("materials/models/player/tinkywinky_css/ear.vtf");
- AddFileToDownloadsTable("materials/models/player/tinkywinky_css/plantar.vmt");
- AddFileToDownloadsTable("materials/models/player/tinkywinky_css/plantar.vtf");
- PrecacheModel("models/player/tinkywinky_css/tinkywinky_css.mdl");
- // po_css
- AddFileToDownloadsTable("models/player/po_css/po_css.dx80.vtx");
- AddFileToDownloadsTable("models/player/po_css/po_css.dx90.vtx");
- AddFileToDownloadsTable("models/player/po_css/po_css.mdl");
- AddFileToDownloadsTable("models/player/po_css/po_css.phy");
- AddFileToDownloadsTable("models/player/po_css/po_css.sw.vtx");
- AddFileToDownloadsTable("models/player/po_css/po_css.vvd");
- AddFileToDownloadsTable("materials/models/player/po_css/face.vmt");
- AddFileToDownloadsTable("materials/models/player/po_css/face.vtf");
- AddFileToDownloadsTable("materials/models/player/po_css/red.vmt");
- AddFileToDownloadsTable("materials/models/player/po_css/red.vtf");
- AddFileToDownloadsTable("materials/models/player/po_css/tv.vmt");
- AddFileToDownloadsTable("materials/models/player/po_css/tv.vtf");
- AddFileToDownloadsTable("materials/models/player/po_css/ear.vmt");
- AddFileToDownloadsTable("materials/models/player/po_css/ear.vtf");
- AddFileToDownloadsTable("materials/models/player/po_css/plantar.vmt");
- AddFileToDownloadsTable("materials/models/player/po_css/plantar.vtf");
- PrecacheModel("models/player/po_css/po_css.mdl");
- // pgm_ct
- AddFileToDownloadsTable("models/player/berserker_ct/berserker_ct.dx80.vtx");
- AddFileToDownloadsTable("models/player/berserker_ct/berserker_ct.dx90.vtx");
- AddFileToDownloadsTable("models/player/berserker_ct/berserker_ct.mdl");
- AddFileToDownloadsTable("models/player/berserker_ct/berserker_ct.phy");
- AddFileToDownloadsTable("models/player/berserker_ct/berserker_ct.sw.vtx");
- AddFileToDownloadsTable("models/player/berserker_ct/berserker_ct.vvd");
- AddFileToDownloadsTable("models/player/berserker_ct/berserker_ct.xbox.vtx");
- AddFileToDownloadsTable("materials/models/player/berserker_ct/berserker_ct.vtf");
- AddFileToDownloadsTable("materials/models/player/berserker_ct/berserker_ct_bump.vtf");
- AddFileToDownloadsTable("materials/models/player/berserker_ct/slow_body.vmt");
- PrecacheModel("models/player/berserker_ct/berserker_ct.mdl");
- // pgm_t
- AddFileToDownloadsTable("models/player/berserker_t/berserker_t.dx80.vtx");
- AddFileToDownloadsTable("models/player/berserker_t/berserker_t.dx90.vtx");
- AddFileToDownloadsTable("models/player/berserker_t/berserker_t.mdl");
- AddFileToDownloadsTable("models/player/berserker_t/berserker_t.phy");
- AddFileToDownloadsTable("models/player/berserker_t/berserker_t.sw.vtx");
- AddFileToDownloadsTable("models/player/berserker_t/berserker_t.vvd");
- AddFileToDownloadsTable("models/player/berserker_t/berserker_t.xbox.vtx");
- AddFileToDownloadsTable("materials/models/player/berserker_t/berserker_t.vtf");
- AddFileToDownloadsTable("materials/models/player/berserker_t/berserker_t_bump.vtf");
- AddFileToDownloadsTable("materials/models/player/berserker_t/slow_body.vmt");
- PrecacheModel("models/player/berserker_t/berserker_t.mdl");
- }
- // if(gametype == GAME_CSGO)
- // {
- // // luciolle_red
- // AddFileToDownloadsTable("models/player/luciolle_red/luciolle_red.dx80.vtx");
- // AddFileToDownloadsTable("models/player/luciolle_red/luciolle_red.dx90.vtx");
- // AddFileToDownloadsTable("models/player/luciolle_red/luciolle_red.mdl");
- // AddFileToDownloadsTable("models/player/luciolle_red/luciolle_red.sw.vtx");
- // AddFileToDownloadsTable("models/player/luciolle_red/luciolle_red.vvd");
- // AddFileToDownloadsTable("materials/models/player/luciolle_red/luciolle_red.vtf");
- // AddFileToDownloadsTable("materials/models/player/luciolle_red/luciolle_red_normal.vtf");
- // AddFileToDownloadsTable("materials/models/player/luciolle_red/lightwarp2.vtf");
- // AddFileToDownloadsTable("materials/models/player/luciolle_red/luciolle_red.vmt");
- // PrecacheModel("models/player/luciolle_red/luciolle_red.mdl");
- //
- // // luciolle_blue
- // AddFileToDownloadsTable("models/player/luciolle_blue/luciolle_blue.dx80.vtx");
- // AddFileToDownloadsTable("models/player/luciolle_blue/luciolle_blue.dx90.vtx");
- // AddFileToDownloadsTable("models/player/luciolle_blue/luciolle_blue.mdl");
- // AddFileToDownloadsTable("models/player/luciolle_blue/luciolle_blue.sw.vtx");
- // AddFileToDownloadsTable("models/player/luciolle_blue/luciolle_blue.vvd");
- // AddFileToDownloadsTable("materials/models/player/luciolle_blue/luciolle_blue.vtf");
- // AddFileToDownloadsTable("materials/models/player/luciolle_blue/luciolle_blue_normal.vtf");
- // AddFileToDownloadsTable("materials/models/player/luciolle_blue/lightwarp2.vtf");
- // AddFileToDownloadsTable("materials/models/player/luciolle_blue/luciolle_blue.vmt");
- // PrecacheModel("models/player/luciolle_blue/luciolle_blue.mdl");
- // }
- AddFileToDownloadsTable("sound/fr/rougbleu.wav");
- PrecacheSound("fr/rougbleu.wav", true);
- g_FreezeSprite=PrecacheModel("sprites/blueglow2.vmt");
- PrecacheSound("physics/glass/glass_impact_bullet4.wav", true);
- }
- // --------------------------------------------------------------------------------------------------------
- //- Hook sur dommages recus
- // --------------------------------------------------------------------------------------------------------
- public OnClientPutInServer( client)
- {
- SDKHook( client, SDKHook_OnTakeDamage, OnTakeDamage);
- SDKHook( client, SDKHook_WeaponCanUse, OnWeaponCanUse);
- }
- // --------------------------------------------------------------------------------------------------------
- //- Charge les informations de ratio du joueur.
- // --------------------------------------------------------------------------------------------------------
- public T_CheckSteamID( Handle:owner, Handle:hndl, const String:error[], any:client)
- {
- if(!IsClientConnected( client)) return;
- if(hndl == INVALID_HANDLE)
- {
- LogError("[ANTIROXX] Query failed! %s", error);
- KickClient(client, "[ANTIROXX] Authorization failed");
- return;
- }
- else if(!SQL_GetRowCount(hndl))
- {
- decl String:auth[MAX_AUTHID_LENGTH];
- GetClientAuthString(client, auth, sizeof(auth));
- decl String:steamid[MAX_AUTHID_LENGTH-8];
- Format(steamid,sizeof(steamid),"%s",auth[8]);
- new String:query[150];
- Format(query, sizeof(query), "insert into css_players (steamid, frag, death) values ('%s',%d, %d)", steamid, Player_Frags[client], Player_Deaths[client]);
- SQL_LockDatabase(hDatabase);
- if(!SQL_FastQuery(hDatabase, query))
- {
- new String:errorsql[255];
- SQL_GetError(hDatabase, errorsql, sizeof(errorsql));
- PrintToServer("[ANTIROXX] Failed to query (error: %s)", errorsql);
- LogError("[ANTIROXX] %s", query);
- }
- SQL_UnlockDatabase(hDatabase);
- plx[client] = 0;
- }
- else
- {
- SQL_FetchRow(hndl);
- Player_Frags[client] = SQL_FetchInt(hndl,0);
- Player_Deaths[client] = SQL_FetchInt(hndl,1);
- plx[client] = SQL_FetchInt(hndl,2);
- }
- Player_Ratio[client]=float(Player_Frags[client])/float(Player_Deaths[client]);
- CheckKick(client);
- isConfigDownload[client] = true;
- }
- // --------------------------------------------------------------------------------------------------------
- //- Lance la requete de chargement du ratio du joueur.
- // --------------------------------------------------------------------------------------------------------
- CheckSteamID(userid, const String:auth[])
- {
- decl String:query[255];
- Format(query, sizeof(query), "SELECT frag, death, plx FROM css_players WHERE steamid = '%s'", auth);
- SQL_TQuery(hDatabase, T_CheckSteamID, query, userid);
- }
- // --------------------------------------------------------------------------------------------------------
- //- Interdit les armes pour le PGM
- // --------------------------------------------------------------------------------------------------------
- public Action:OnWeaponCanUse(client, weapon)
- {
- if(isPlayerPgm[client])
- {
- new String:gweapon[64];
- GetEntityClassname(weapon, gweapon, sizeof(gweapon));
- if(!StrEqual(gweapon,"weapon_knife")
- && !StrEqual(gweapon,"weapon_hegrenade")
- && !StrEqual(gweapon,"weapon_smokegrenade")
- && !StrEqual(gweapon,"weapon_flashbang")
- && !StrEqual(gweapon,"weapon_c4"))
- return Plugin_Handled;
- }
- return Plugin_Continue;
- }
- // --------------------------------------------------------------------------------------------------------
- //- Quand on recois des dommages (AVANT application des dommages)
- // --------------------------------------------------------------------------------------------------------
- public Action:OnTakeDamage(victim, &attacker, &inflictor, &Float:damage, &damagetype)
- {
- if((attacker>0 && attacker<=MaxClients) && (victim>0 && victim<=MaxClients))
- {
- decl String:Weapon[32];
- GetClientWeapon(attacker, Weapon, sizeof(Weapon));
- if(StrEqual(Weapon, "weapon_knife")) return Plugin_Continue;
- if(!(damagetype & DMG_BULLET)) return Plugin_Continue;
- if(Player_Ratio[attacker]>RATIO_CONFIRME)
- {
- if(Player_Ratio[attacker]>Player_Ratio[victim])
- {
- new Float:NewDamage=(g_handicap-(Player_Ratio[attacker]-Player_Ratio[victim]))*damage;
- if(NewDamage<0.0) NewDamage=0.0;
- // CPrintToChat(attacker, "{green}[ANTIROXX] {olive} Damage: %5.0f NewDamage: %5.0f", damage, NewDamage);
- damage=NewDamage;
- return Plugin_Changed;
- }
- }
- }
- return Plugin_Continue;
- }
- // --------------------------------------------------------------------------------------------------------
- //- Affiche la liste des ratio des joueurs et permets de les modifier.
- // --------------------------------------------------------------------------------------------------------
- public Action:Antiroxx_List(client, args)
- {
- if(!cvar_Active) return Plugin_Continue;
- new AdminId:targetAdmin = GetUserAdmin(client);
- if (targetAdmin != INVALID_ADMIN_ID)
- {
- if(args>=3 && (GetAdminImmunityLevel(targetAdmin) >= 90))
- {
- new String:arg1[32], String:arg2[32], String:arg3[32];
- new Frag, Death;
- if(GetCmdArg(1, arg1, sizeof(arg1)) && GetCmdArg(2, arg2, sizeof(arg2)) && GetCmdArg(3, arg3, sizeof(arg3)))
- {
- new target=FindTarget(client, arg1);
- if(target == -1)
- {
- return Plugin_Handled;
- }
- Frag = StringToInt(arg2);
- Death = StringToInt(arg3);
- new cvar_deaths_default=GetConVarInt(gDeaths_default);
- if(Death<=(cvar_deaths_default+10))
- {
- ReplyToCommand(client,"Le nombre de Death DOIT etre superieur a %d", cvar_deaths_default+10);
- return Plugin_Handled;
- }
- Player_Frags[target]=Frag;
- Player_Deaths[target]=Death;
- if(Death>0) Player_Ratio[target]=float(Frag)/float(Death);
- }
- }
- else
- {
- ReplyToCommand(client," id : uid : Player :Ratio: Frag: Death");
- for( new i=1; i<MaxClients; i++)
- {
- if(IsClientInGame(i))
- {
- new String:Name[MAX_NAME_LENGTH];
- GetClientName(i, Name, sizeof(Name));
- ReplyToCommand(client,"%4d: %4d: %25s: %5.2f, %4d, %4d", i, GetClientUserId(i), Name, Player_Ratio[i], Player_Frags[i], Player_Deaths[i]);
- }
- }
- ReplyToCommand(client,"--------------------------------------------");
- ReplyToCommand(client,"Autre Usage: sm_antiroxx <name|#userid> <frag> <death>");
- ReplyToCommand(client,"--------------------------------------------");
- }
- }
- return Plugin_Handled;
- }
- // --------------------------------------------------------------------------------------------------------
- //- Des que l'on ramasse quelque chose
- // --------------------------------------------------------------------------------------------------------
- public Action:Event_ItemPickup(Handle:event, const String:name[], bool:dontbroadcoast)
- {
- if(!cvar_Active) return Plugin_Continue;
- if(GetRealClientCount()<cvar_MinimumPly) return Plugin_Continue;
- new userid = GetEventInt(event, "userid");
- new String:weapon[64];
- GetEventString(event, "item", weapon, sizeof(weapon));
- new client = GetClientOfUserId(userid);
- if(!IsClientInGame(client)) return Plugin_Continue;
- new group_weapon = getGroupWeapon(weapon);
- if(isPlayerPgm[client])
- {
- if(!StrEqual(weapon, "knife", false))
- {
- FakeClientCommand(client, "use weapon_knife");
- new Handle:pack = CreateDataPack();
- WritePackCell(pack, client);
- WritePackString(pack, weapon);
- CreateTimer(0.1, DelayWeapon, pack);
- }
- }
- else if((Player_Ratio[client] >= cvar_snipe) && (group_weapon == GROUP_SNIPE))
- CS_DropWeapon(client, GetPlayerWeaponSlot(client, 0), true);
- return Plugin_Continue;
- }
- // --------------------------------------------------------------------------------------------------------
- //- Pas touche..
- // --------------------------------------------------------------------------------------------------------
- public Action:DelayWeapon(Handle:timer, any:data)
- {
- new Handle:pack = data;
- ResetPack(pack);
- new client = ReadPackCell(pack);
- new String:item[64];
- ReadPackString(pack, item, sizeof(item));
- CloseHandle(pack);
- for( new i=0; i<2; i++)
- {
- new ent = GetPlayerWeaponSlot(client, i);
- if(ent != -1)
- {
- RemovePlayerItem(client, ent);
- RemoveEdict(ent);
- }
- }
- }
- // --------------------------------------------------------------------------------------------------------
- //- A la mort d'un joueur
- // --------------------------------------------------------------------------------------------------------
- public Action:Event_PlayerDeath(Handle:event, const String:name[], bool:dontbroadcoast)
- {
- if(!cvar_Active) return Plugin_Continue;
- if(GetRealClientCount()<cvar_MinimumPly) return Plugin_Continue;
- new attackerID=GetEventInt(event, "attacker");
- attackerID=GetClientOfUserId(attackerID);
- new victimID=GetEventInt(event, "userid");
- victimID=GetClientOfUserId(victimID);
- new String:weapon[10];
- GetEventString(event, "weapon", weapon, 10);
- if((isPlayerLuciole[victimID]) && (attackerID > 0) && (!isPlayerLuciole[attackerID]))
- {
- if(!((StrContains(weapon, "knife", true) != -1) || (StrContains(weapon, "hegrenade", true) != -1)))
- {
- PrintCenterText(attackerID, "[ANTIROXX] %t", "Kill_Luciole");
- CPrintToChat(attackerID, "{green}[ANTIROXX] {red}%t", "Kill_Luciole");
- isPunished[attackerID] = 1;
- }
- }
- if((attackerID > 0) && (IsClientInGame(attackerID)) && (!IsFakeClient(victimID)) && (!IsFakeClient(attackerID))) Player_Frags[attackerID]++;
- if((IsClientInGame(victimID)) && (!IsFakeClient(attackerID)) && (!IsFakeClient(victimID))) Player_Deaths[victimID]++;
- return Plugin_Continue;
- }
- // --------------------------------------------------------------------------------------------------------
- // Kill le tueur de luciolle.
- // --------------------------------------------------------------------------------------------------------
- public Action:killattaqueur(Handle:timer, any:client)
- {
- ForcePlayerSuicide(client);
- }
- // --------------------------------------------------------------------------------------------------------
- // Slap du joueur en cas d'attaque de la luciole
- // --------------------------------------------------------------------------------------------------------
- public Action:Event_PlayerHurt(Handle:event,const String:name[],bool:dontBroadcast)
- {
- if(!cvar_Active) return Plugin_Continue;
- if(GetRealClientCount()<cvar_MinimumPly) return Plugin_Continue;
- new attackerID = GetEventInt ( event, "attacker" ) ; // ID de l'attaquant
- if(GetClientOfUserId(attackerID) > 0)
- {
- if(IsFakeClient(GetClientOfUserId(attackerID))) return Plugin_Continue;
- new victimID = GetEventInt(event, "userid" ); // ID de la victime
- victimID = GetClientOfUserId(victimID);
- if(isPlayerLuciole[victimID])
- {
- attackerID = GetClientOfUserId (attackerID);
- if(!isPlayerLuciole[attackerID] )
- {
- new String:weapon[32];
- GetEventString(event, "weapon", weapon, sizeof(weapon)); // Arme utilisé
- if(!((StrContains(weapon, "knife", true) != -1) || (StrContains(weapon, "hegrenade", true) != -1)))
- {
- new Damage=GetEventInt(event, "dmg_health");
- if (GetClientHealth(attackerID) <= Damage) { CreateTimer(1.0, killattaqueur, attackerID); } else { SlapPlayer(attackerID, Damage); }
- }
- }
- }
- }
- return Plugin_Continue;
- }
- // --------------------------------------------------------------------------------------------------------
- //- Au respawn du joueur
- // --------------------------------------------------------------------------------------------------------
- public Action:Event_PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
- {
- new client = GetClientOfUserId(GetEventInt(event, "userid"));
- if(IsFakeClient(client)) return Plugin_Continue;
- SetClanTag(client);
- if(!cvar_Active) return Plugin_Continue;
- SetEntProp(client, Prop_Send, "m_iAccount", START_MONEY);
- g_hAfkCheckSpawn[client] = CreateTimer(0.2, TakeEyePosition, client);
- if(GetRealClientCount()<cvar_MinimumPly) return Plugin_Continue;
- new String:auth[MAX_AUTHID_LENGTH];
- GetClientAuthString(client, auth, sizeof(auth));
- decl String:steamid[MAX_AUTHID_LENGTH-8];
- Format(steamid,sizeof(steamid),"%s",auth[8]);
- if(Player_Ratio[client]<RATIO_JUNIOR)
- {
- SetEntityHealth(client, HP_LUCIOLE);
- isPlayerLuciole[client]=1;
- CreateTimer(2.0, SkinLuciole, client);
- PrintCenterText(client, "[ANTIROXX] %t", "You_Are_Luciole");
- CPrintToChat(client, "{green}[ANTIROXX] {olive}%t", "You_Are_Luciole");
- }
- else if(Player_Ratio[client]<RATIO_DEBUTANT)
- {
- SetEntityHealth(client, HP_JUNIOR);
- PrintCenterText(client, "[ANTIROXX] %t", "You_Are_Junior");
- CPrintToChat(client, "{green}[ANTIROXX] {olive}%t", "You_Are_Junior");
- }
- else if(Player_Ratio[client]<RATIO_PGM)
- {
- if( Player_Ratio[client]>=cvar_snipe )
- {
- new weapon = GetPlayerWeaponSlot(client, 0);
- if(weapon != -1)
- {
- new String:weapon_name[64];
- GetEdictClassname(weapon, weapon_name, 64);
- if(getGroupWeapon(weapon_name) == GROUP_SNIPE)
- CS_DropWeapon(client, GetPlayerWeaponSlot(client, 0), true);
- }
- CPrintToChat(client, "{green}[ANTIROXX] {olive}%t", "Snipe_Restrict");
- }
- }
- else
- {
- if(gametype==GAME_CSS) { SetEntityHealth(client, HP_PGM_CSS); }
- else if(gametype==GAME_CSGO) { SetEntityHealth(client, HP_PGM_CSGO); }
- isPlayerPgm[client] = 1;
- for(new i=0; i<2; i++)
- {
- new ent = GetPlayerWeaponSlot(client, i);
- if(ent != -1)
- {
- RemovePlayerItem(client, ent);
- RemoveEdict(ent);
- }
- }
- FakeClientCommand(client, "use weapon_knife");
- SetEntPropFloat( client, Prop_Data, "m_flLaggedMovementValue", 0.8);
- CreateTimer(2.0, SkinPgm, client);
- CPrintToChat(client, "{green}[ANTIROXX] {olive}%t", "You_Are_PGM");
- }
- if(isPunished[client])
- {
- isPunished[client]=0;
- CPrintToChat(client, "{green}[ANTIROXX] {red} %t", "You_Are_Punish");
- CreateTimer(1.0, killattaqueur, client);
- }
- return Plugin_Continue;
- }
- // --------------------------------------------------------------------------------------------------------
- //- Met en place le niveau du joueur.
- // --------------------------------------------------------------------------------------------------------
- SetClanTag(client)
- {
- new cvar_deaths_default=GetConVarInt(gDeaths_default);
- if(Player_Deaths[client]>(cvar_deaths_default+10))
- {
- if(Player_Ratio[client]<RATIO_JUNIOR) { CS_SetClientClanTag( client,"[ LUCIOLE ]"); return; }
- if(Player_Ratio[client]<RATIO_DEBUTANT) { CS_SetClientClanTag( client,"[ JUNIOR ]"); return; }
- if(Player_Ratio[client]<RATIO_DEBUTANT_PLUS) { CS_SetClientClanTag( client,"[DEBUTANT ]"); return; }
- if(Player_Ratio[client]<RATIO_CONFIRME) { CS_SetClientClanTag( client,"[DEBUTANT+]"); return; }
- if(Player_Ratio[client]<RATIO_CONFIRME_PLUS) { CS_SetClientClanTag( client,"[CONFIRME ]"); return; }
- if(Player_Ratio[client]<RATIO_AVANCE) { CS_SetClientClanTag( client,"[CONFIRME+]"); return; }
- if(Player_Ratio[client]<RATIO_AVANCE_PLUS) { CS_SetClientClanTag( client,"[ AVANCE ]"); return; }
- if(Player_Ratio[client]<RATIO_PRO) { CS_SetClientClanTag( client,"[ AVANCE+ ]"); return; }
- if(Player_Ratio[client]<RATIO_PRO_PLUS) { CS_SetClientClanTag( client,"[ PRO ]"); return; }
- if(Player_Ratio[client]<RATIO_PGM) { CS_SetClientClanTag( client,"[ PRO+ ]"); return; }
- CS_SetClientClanTag( client,"[ -=PGM=- ]");
- }
- else { CS_SetClientClanTag( client,""); }
- return;
- }
- // --------------------------------------------------------------------------------------------------------
- //- Met le skin luciole après 2 seconde de jeu.
- // --------------------------------------------------------------------------------------------------------
- public Action:SkinLuciole(Handle:timer, any:client)
- {
- if(gametype==GAME_CSS)
- {
- if(GetClientTeam(client)==CS_TEAM_CT) SetEntityModel(client, "models/player/tinkywinky_css/tinkywinky_css.mdl");
- else SetEntityModel(client, "models/player/po_css/po_css.mdl");
- }
- if(gametype==GAME_CSGO)
- {
- // if(GetClientTeam(client)==CS_TEAM_CT) SetEntityModel(client, "models/player/luciolle_blue/luciolle_blue.mdl");
- // else SetEntityModel(client, "models/player/luciolle_red/luciolle_red.mdl");
- SetEntityRenderFx(client, RENDERFX_GLOWSHELL);
- SetEntityRenderMode(client, RENDER_WORLDGLOW);
- if(GetClientTeam(client)==CS_TEAM_CT) { SetEntityRenderColor(client, 100, 200, 255, 255); }
- else { SetEntityRenderColor(client, 255, 100, 100, 255); }
- }
- }
- // --------------------------------------------------------------------------------------------------------
- //- Met le skin Pgm après 2 seconde de jeu.
- // --------------------------------------------------------------------------------------------------------
- public Action:SkinPgm(Handle:timer, any:client)
- {
- if(gametype==GAME_CSS)
- {
- if(GetClientTeam(client) == CS_TEAM_CT) SetEntityModel(client, "models/player/berserker_ct/berserker_ct.mdl");
- else SetEntityModel(client, "models/player/berserker_t/berserker_t.mdl");
- }
- }
- // --------------------------------------------------------------------------------------------------------
- // congeler un joueur
- // --------------------------------------------------------------------------------------------------------
- public Action:FreezePlayer(Handle:timer, any:client)
- {
- for(new i=0; i<4; i++)
- {
- new ent = GetPlayerWeaponSlot(client, i);
- if(ent != -1)
- {
- RemovePlayerItem(client, ent);
- RemoveEdict(ent);
- }
- }
- new Float:vec[3];
- GetClientAbsOrigin(client, vec);
- EmitAmbientSound("physics/glass/glass_impact_bullet4.wav", vec, client);
- TE_SetupGlowSprite(vec, g_FreezeSprite, 0.95, 1.5, 50);
- TE_SendToAll();
- SetEntityMoveType(client, MOVETYPE_NONE);
- CloseHandle(timer);
- }
- // --------------------------------------------------------------------------------------------------------
- //- Au debut du round
- // --------------------------------------------------------------------------------------------------------
- public Action:Event_RoundStart(Handle:event, const String:name[], bool:dontbroadcoast)
- {
- cvar_Active=GetConVarBool(gActive);
- if(!cvar_Active) { return Plugin_Continue; }
- cvar_MinimumPly=GetConVarInt(gMinimumPly);
- if(GetRealClientCount()<cvar_MinimumPly) { return Plugin_Continue; }
- cvar_snipe=GetConVarFloat(gRatio_snipe);
- cvar_flash=GetConVarFloat(gRatio_flash);
- new thereIsLuciole=0;
- for( new i=1; i<MaxClients; i++)
- {
- if((IsClientInGame(i))&&(GetClientTeam(i)>CS_TEAM_SPECTATOR)&&(Player_Ratio[i]<RATIO_JUNIOR)) { thereIsLuciole=1; }
- }
- if(thereIsLuciole)
- {
- CPrintToChatAll("{green}[ANTIROXX] {olive}%t", "Luciole_InGame");
- CreateTimer(5.0, LucioleInGame);
- }
- return Plugin_Continue;
- }
- // --------------------------------------------------------------------------------------------------------
- //- A la fin du round
- // --------------------------------------------------------------------------------------------------------
- public Action:Event_RoundEnd(Handle:event, const String:name[], bool:dontbroadcoast)
- {
- if(!cvar_Active) return Plugin_Continue;
- for( new client=1; client<MaxClients; client++)
- {
- if(IsClientInGame(client))
- {
- new cvar_maxcumul=GetConVarInt(gMaxCumul);
- if(Player_Deaths[client]>=cvar_maxcumul)
- {
- Player_Deaths[client] /= 2;
- Player_Frags[client] /= 2;
- }
- Player_Ratio[client] = float(Player_Frags[client])/float(Player_Deaths[client]);
- isPlayerLuciole[client]=0;
- isPlayerPgm[client]=0;
- if(!IsFakeClient(client))
- {
- new String:auth[MAX_AUTHID_LENGTH];
- GetClientAuthString(client, auth, sizeof(auth));
- decl String:steamid[MAX_AUTHID_LENGTH-8];
- Format(steamid,sizeof(steamid),"%s",auth[8]);
- if(isConfigDownload[client])
- {
- decl String:pseudo[MAX_NAME_LENGTH], String:pseudo_esc[128];
- GetClientName(client, pseudo, sizeof(pseudo));
- SQL_EscapeString(hDatabase, pseudo, pseudo_esc, sizeof(pseudo_esc));
- new String:query[150];
- Format(query, sizeof(query), "UPDATE css_players SET pseudo='%s' ,frag='%d', death='%d' WHERE steamid='%s'", pseudo_esc, Player_Frags[client], Player_Deaths[client], steamid);
- SQL_LockDatabase(hDatabase);
- if(!SQL_FastQuery(hDatabase, query))
- {
- new String:error[255];
- SQL_GetError(hDatabase, error, sizeof(error));
- PrintToServer("[ANTIROXX] Failed to query (error: %s)", error);
- LogError("[ANTIROXX] %s", query);
- }
- SQL_UnlockDatabase(hDatabase);
- }
- else { CheckSteamID(client, steamid); }
- }
- }
- }
- return Plugin_Continue;
- }
- // --------------------------------------------------------------------------------------------------------
- //- Au moment de l'achat
- // --------------------------------------------------------------------------------------------------------
- public Action:CS_OnBuyCommand(client, const String:weapon[])
- {
- if((!cvar_Active) || (!IsClientInGame(client))) { return Plugin_Continue; }
- if(GetRealClientCount()<cvar_MinimumPly) { return Plugin_Continue; }
- new group_weapon = getGroupWeapon(weapon);
- if(isPlayerPgm[client]) { return Plugin_Handled; }
- if((Player_Ratio[client] >= cvar_snipe) && (group_weapon == GROUP_SNIPE)) { return Plugin_Handled; }
- if((Player_Ratio[client] >= cvar_flash) && (group_weapon == GROUP_FLASH)) { return Plugin_Handled; }
- else { return Plugin_Continue; }
- }
- // --------------------------------------------------------------------------------------------------------
- //- Recupere le type de l'arme
- // --------------------------------------------------------------------------------------------------------
- getGroupWeapon(const String:weapon[])
- {
- if((StrContains(weapon, "awp", true) != -1) ||
- (StrContains(weapon, "sg550", true) != -1) ||
- (StrContains(weapon, "g3sg1", true) != -1)) { return GROUP_SNIPE; }
- else if(StrContains(weapon, "flashbang", true) != -1) { return GROUP_FLASH; }
- else if(StrContains(weapon, "world", true) != -1) { return GROUP_WORLD; }
- else { return GROUP_OTHERS; }
- }
- // --------------------------------------------------------------------------------------------------------
- //- Une fois le client authentifié
- // --------------------------------------------------------------------------------------------------------
- public OnClientAuthorized(client)
- {
- reset_infos(client);
- if(IsFakeClient(client)) { return; }
- decl String:auth[MAX_AUTHID_LENGTH];
- GetClientAuthString(client, auth, sizeof(auth));
- decl String:steamid[MAX_AUTHID_LENGTH-8];
- Format(steamid,sizeof(steamid),"%s",auth[8]);
- CheckSteamID(client, steamid);
- }
- // --------------------------------------------------------------------------------------------------------
- //- Reset des informations(pour être sûr)
- // --------------------------------------------------------------------------------------------------------
- reset_infos(client)
- {
- new cvar_frags_default=GetConVarInt(gFrags_default);
- new cvar_deaths_default=GetConVarInt(gDeaths_default);
- Player_Frags[client]=cvar_frags_default;
- Player_Deaths[client]=cvar_deaths_default;
- Player_Ratio[client]=float(Player_Frags[client])/float(Player_Deaths[client]);
- isPlayerLuciole[client]=0;
- isPunished[client]=0;
- isConfigDownload[client]=false;
- TimePlayed[client] = GetTime();
- }
- // --------------------------------------------------------------------------------------------------------
- //- Emet de temps en temps un message d'avertissement luciole.
- // --------------------------------------------------------------------------------------------------------
- public Action:LucioleInGame(Handle:timer)
- {
- if(GetRandomInt(1,16)>12) EmitSoundToAll("fr/rougbleu.wav");
- }
- // --------------------------------------------------------------------------------------------------------
- //- Prends la position des yeux.
- // --------------------------------------------------------------------------------------------------------
- public Action:TakeEyePosition(Handle:timer, any:client)
- {
- if(g_hAfkCheckTimer[client]!=INVALID_HANDLE) KillTimer(g_hAfkCheckTimer[client]);
- GetClientEyePosition(client, SpawnPos[client]);
- g_hAfkCheckTimer[client]=CreateTimer(25.0, CheckForAfk, client);
- g_hAfkCheckSpawn[client]=INVALID_HANDLE;
- }
- // --------------------------------------------------------------------------------------------------------
- //- Verifie la position des yeux.
- // --------------------------------------------------------------------------------------------------------
- public Action:CheckForAfk(Handle:timer, any:client)
- {
- GetClientEyePosition(client, CurrentPos[client]);
- if(SpawnPos[client][0] == CurrentPos[client][0] && SpawnPos[client][1] == CurrentPos[client][1] && SpawnPos[client][2] == CurrentPos[client][2])
- {
- decl String:name[MAX_NAME_LENGTH];
- GetClientName(client, name, sizeof(name));
- SlapPlayer(client, 200, false);
- PrintToChatAll("\x04Le joueur %s a ete tue (raison:AFK) .", name);
- }
- g_hAfkCheckTimer[client]=INVALID_HANDLE;
- }
- // --------------------------------------------------------------------------------------------------------
- //- A la deconnexion du joueur
- // --------------------------------------------------------------------------------------------------------
- public OnClientDisconnect(client)
- {
- if(!cvar_Active) return;
- if(g_hAfkCheckTimer[client] != INVALID_HANDLE)
- {
- KillTimer(g_hAfkCheckTimer[client]);
- g_hAfkCheckTimer[client] = INVALID_HANDLE;
- }
- new cvar_maxcumul = GetConVarInt(gMaxCumul);
- if(Player_Deaths[client] >= cvar_maxcumul)
- {
- Player_Deaths[client] /= 2;
- Player_Frags[client] /= 2;
- }
- Player_Ratio[client]=float(Player_Frags[client])/float(Player_Deaths[client]);
- isPlayerLuciole[client]=0;
- isPlayerPgm[client]=0;
- if(!IsFakeClient(client))
- {
- new String:auth[MAX_AUTHID_LENGTH];
- new String:query[150];
- new String:ClientIP[17];
- GetClientIP(client, ClientIP, sizeof(ClientIP));
- GetClientAuthString(client, auth, sizeof(auth));
- decl String:steamid[MAX_AUTHID_LENGTH-8];
- Format(steamid,sizeof(steamid),"%s",auth[8]);
- TimePlayed[client] = GetTime() - TimePlayed[client];
- Format(query, sizeof(query), "UPDATE css_players SET `frag`='%d', `death`='%d', `ip`='%s', `timeplayed`=`timeplayed`+%d WHERE `steamid`='%s'", Player_Frags[client], Player_Deaths[client], ClientIP, TimePlayed[client], steamid);
- if(isConfigDownload[client])
- {
- SQL_LockDatabase(hDatabase);
- if(!SQL_FastQuery(hDatabase, query))
- {
- new String:error[255];
- SQL_GetError(hDatabase, error, sizeof(error));
- PrintToServer("[ANTIROXX] Failed to query (error: %s)", error);
- LogError("[ANTIROXX] %s", query);
- }
- SQL_UnlockDatabase(hDatabase);
- }
- else CheckSteamID(client, steamid);
- }
- }
- // --------------------------------------------------------------------------------------------------------
- //- Retourne le nombre réel de joueurs connectés.
- // --------------------------------------------------------------------------------------------------------
- GetRealClientCount()
- {
- new clients = 0;
- for( new i = 1; i <= MaxClients; i++ )
- {
- if((IsClientInGame(i)) && (!IsFakeClient(i)) && (GetClientTeam(i)>CS_TEAM_SPECTATOR) ) { clients++; }
- }
- return clients;
- }
- // --------------------------------------------------------------------------------------------------------
- //- Verification si le joueurs est autorisé a se connecter.
- // --------------------------------------------------------------------------------------------------------
- CheckKick(client)
- {
- new cvar_deaths_default=GetConVarInt(gDeaths_default);
- if(Player_Deaths[client]>(cvar_deaths_default+10))
- {
- if(GetConVarInt(gServeur)==1 && !(plx[client]&1))
- {
- decl String:NewServer[24];
- decl String:KickMessage[128];
- GetConVarString(gNewServer,NewServer,sizeof(NewServer));
- Format(KickMessage, sizeof(KickMessage), "%t %s", "Too_Strong", NewServer);
- if(Player_Ratio[client]>=GetConVarFloat(gRatioAuth)) { KickClient(client, KickMessage); }
- }
- else if(GetConVarInt(gServeur)==2 && !(plx[client]&2))
- {
- decl String:NewServer[24];
- decl String:KickMessage[128];
- GetConVarString(gNewServer,NewServer,sizeof(NewServer));
- Format(KickMessage, sizeof(KickMessage), "%t %s", "Too_Low", NewServer);
- if(Player_Ratio[client]<=GetConVarFloat(gRatioAuth)) { KickClient(client, KickMessage); }
- }
- }
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement