Je n'arrive pas à faire fonctionner ce script comme je le voudrais:
Code : Tout sélectionner
$Pass1= "Xexeloboum"
Global $MDP
$MDP=0
HotKeySet("P","_Exit")
While 1
If $MDP=1 Then
MsgBox(0,"Compteur","Plus que 9 tentatives!")
EndIf
If $MDP=2 Then
MsgBox(0,"Compteur","Plus que 8 tentatives!")
EndIf
If $MDP=3 Then
MsgBox(0,"Compteur","Plus que 7 tentatives!")
EndIf
If $MDP=4 Then
MsgBox(0,"Compteur","Plus que 6 tentatives!")
EndIf
If $MDP=5 Then
MsgBox(0,"Compteur","Plus que 5 tentatives!")
EndIf
If $MDP=6 Then
MsgBox(0,"Compteur","Plus que 4 tentatives!")
EndIf
If $MDP=7 Then
MsgBox(0,"Compteur","Plus que 3 tentatives!")
EndIf
If $MDP=8 Then
MsgBox(0,"Compteur","Plus que 2 tentatives!")
EndIf
If $MDP=9 Then
MsgBox(0,"Compteur","Plus que 1 tentative!")
EndIf
If $MDP=10 Then
MsgBox(0,"Compteur","Vous avez perdu!")
_Mario()
EndIf
If $MDP>10 Then
MsgBox(0,"Mot de passe:","J'ai dit 10 tentatives! Pas plus!")
_Mario()
EndIf
WEnd
Func _Exit()
$input= InputBox("Tentative","Entrez le mot de passe:")
If ($input<>$Pass1) Then
MsgBox(0,"Mot de passe:","Faux!")
$MDP=$MDP+1
Else
MsgBox(0,"Mot de passe:","Bravo, Mot de passe accepté.")
Exit
EndIf
EndFunc
Merci!




