Vous n'êtes pas identifié.
Pages: 1
Posté sur le forum du site officiel du jeu
Pour ceux qui utilisent etadmin_mod sur leur serveur et qui attendent une nouvelle version du DutchFix ( ;) ), voici un petit patch que j'ai fait qui kicke les joueurs qui veulent utiliser les exploits suivants:
- 15 nades
- 15 flashs
- changement de skin (VIP)
Ces codes sont utilisés largement et ennuyeux pour tout le monde.
Cela va simplement kicker les cheaters pour 5 minutes (dépendant de votre configuration).
Pourquoi seulement les kicker au lieu de les bannir ?
Parce qu'ils sont détectés et kickés AVANT d'avoir la possibilité d'utiliser le cheat :P.
Editer votre etadmin_mod.pl et trouvez les lignes suivantes (lignes 2918-2920 dans la version originale)
$guid =~ s/ $//g; $guid = $over_guid if ( !$guid ); $userinfo{$name} = $guid if ( !defined( $userinfo{$name} ) && $guid );
APRES ajoutez les lignes suivantes:
# START: [FanT]AsthMaTiK tcetest [15 grenades/15 flashs/skin change] cheats fix my $side_weapon = $$rhash{'sw'}; if ( ( $side_weapon eq '9' ) || ( $weapon eq '9' ) ) { &log("[15 NADES CHEAT] Kicked $name ($guid). He wanted to use the cheat of the 15 grenades!"); &global_remote_send( "^1[15 NADES CHEAT]: $name $guid", "ETM-INFO" ); &say( "^1[15 NADES CHEAT]^3 $name -> Kick !!!" ); &kick( $client_id, "^1[15 NADES CHEAT] Attempt of cheat!" ); last; } if ( ( $side_weapon eq '4' ) || ( $weapon eq '4' ) ) { &log("[15 FLASHS CHEAT] Kicked $name ($guid). He wanted to use the cheat of the 15 flashs!"); &global_remote_send( "^1[15 FLASHS CHEAT]: $name $guid", "ETM-INFO" ); &say( "^1[15 FLASHS CHEAT]^3 $name -> Kick !!!" ); &kick( $client_id, "^1[15 FLASHS CHEAT] Attempt of cheat!"); last; } if ( $class eq '6' ) { &log("[CHANGE OF SKIN] Kicked $name ($guid). He was using the change to vip skin!"); &global_remote_send( "^1[CHANGE OF SKIN] $name $guid ^3-> Kick !!!", "ETM-INFO" ); &say( "^1[CHANGE OF SKIN]^3 $name -> Kick !!!" ); &kick( $client_id, "^1[CHANGE OF SKIN] You are not allowed to change of skin!" ); last; } # END: [FanT]AsthMaTiK tcetest [15 grenades/15 flashs/skin change] cheats fix
Profitez :)
Hors ligne
Ok, j'ai fait une nouvelle version du patch qui prend en compte les armes légales uniquement...
Cette fois, c'est fait en deux parties dans etadmin_mod.pl:
- une table de déclaration
- le patch en lui-même
Pour la déclaration trouvez:
############################################################## # ------------------------------------------------------------ # ----------- Don't change anything below this line ---------- # --------------- unless you know what you do! --------------- # ------------------------------------------------------------
AU DESSUS ajoutez ces lignes:
# START: [FanT]AsthMaTiK tcetest Legal Weapons Declaration my %TCE_LegalWeapons = ( '0' => 'Empty_At_Connection', '2' => 'SH1' , '3' => 'SH8' , '5' => 'TH6' , '6' => 'TH19', '7' => 'SH6' , '8' => 'TH1' , '10' => 'SH7' , '13' => 'TH20', '14' => 'SH4' , '23' => 'TH16', '24' => 'TH10', '25' => 'TH18', '32' => 'TH17', '33' => 'TH4' , '37' => 'SHA2', '38' => 'SHA1', '39' => 'SH2' , '40' => 'SH5' , '41' => 'TH3' , '42' => 'TH5' , '43' => 'TH8' , '44' => 'TH7' , '45' => 'TH2' , '46' => 'TH15', '47' => 'TH13', '48' => 'TH11', '49' => 'TH12', '50' => 'TH9' , '51' => 'TH14', '52' => 'SH3' , '53' => 'SHA4', '54' => 'SHA3', ); # END: [FanT]AsthMaTiK tcetest Legal Weapons Declaration
Pour le patch en lui-même, il est à la même place qu'avant (lignes 2918-2920 dans la version originale):
$guid =~ s/ $//g; $guid = $over_guid if ( !$guid ); $userinfo{$name} = $guid if ( !defined( $userinfo{$name} ) && $guid );
APRES ajoutez les lignes suivantes:
# START: [FanT]AsthMaTiK tcetest [15 grenades/15 flashs/skin change/other team command] cheats fix my $side_weapon = $$rhash{'sw'}; my $latched_weapon = $$rhash{'lw'}; # 15 NADES CHEAT if ( ( $side_weapon == 9 ) || ( $weapon == 9 ) || ( $latched_weapon == 9 ) ) { &log("[15 NADES CHEAT] Kicked $name ($guid). He wanted to use the cheat of the 15 grenades!"); &global_remote_send( "^1[15 NADES CHEAT]: $name $guid", "ETM-INFO" ); &say( "^1[15 NADES CHEAT]^3 $name -> Kick !!!" ); &kick( $client_id, "^1[15 NADES CHEAT] Attempt of cheat!" ); last; } # 15 FLASHS CHEAT if ( ( $side_weapon == 4 ) || ( $weapon == 4 ) || ( $latched_weapon == 4 ) ) { &log("[15 FLASHS CHEAT] Kicked $name ($guid). He wanted to use the cheat of the 15 flashs!"); &global_remote_send( "^1[15 FLASHS CHEAT]: $name $guid", "ETM-INFO" ); &say( "^1[15 FLASHS CHEAT]^3 $name -> Kick !!!" ); &kick( $client_id, "^1[15 FLASHS CHEAT] Attempt of cheat!"); last; } # CHANGE OF SKIN if ( $class == 6 ) { &log("[CHANGE OF SKIN] Kicked $name ($guid). He was using the change to vip skin!"); &global_remote_send( "^1[CHANGE OF SKIN] $name $guid ^3-> Kick !!!", "ETM-INFO" ); &say( "^1[CHANGE OF SKIN]^3 $name -> Kick !!!" ); &kick( $client_id, "^1[CHANGE OF SKIN] You are not allowed to change of skin!" ); last; } # Other /TEAM CHEAT ATTEMPT if ( ( $team > 3 ) || ( $class >= 6 ) || ( length( $TCE_LegalWeapons{$weapon} ) == 0 ) || ( length( $TCE_LegalWeapons{$side_weapon} ) == 0 ) || ( length( $TCE_LegalWeapons{$latched_weapon} ) == 0 ) ) { &log("[/TEAM CHEAT ATTEMPT] Kicked $name ($guid). He wanted to use the cheat trying the /team $team $class $weapon $side_weapon !"); &global_remote_send( "^1[CHEAT ATTEMPT]: $name $guid /team $team $class $weapon $side_weapon", "ETM-INFO" ); &say( "^1[/TEAM CHEAT ATTEMPT]^3 $name -> Kick !!!" ); &kick( $client_id, "^1[/TEAM CHEAT ATTEMPT] You are not allowed to use illegal /team command!"); last; } # END: [FanT]AsthMaTiK tcetest [15 grenades/15 flashs/skin change/other team command] cheats fix
Comment ça marche ?
Dans %TCE_LegalWeapons sont définies tous les codes weaponID légaux associés à leur nombre.
Quand un nombre est passé à la commande /team, il vérifie la longueur de la chaîne associée.
C'est très facile pour perl d'utiliser de telles structures.
J'ai ajouté le code 0, même si c'est une valeur illégale car elle est utilsée à la connexion.
Ce serait dommage d'être kické pour rien :)
J'espère que ça va t'aider Dutchmeat, nous avons toujours besoin de l'anti-nuke et weaponstats à un niveau inférieur :)
P.S.:
Tu dois utiliser \w and \sw car on peut inverser l'ordre des armes dans la commande /team...
C'est ainsi que les cheaters ont réussi à passer outre ton fix ;)
Hors ligne
Pages: 1