GTAOnline.net
San Andreas Multiplayer (sa:mp) => Scripting SA-MP [Pawn center] => Discussion démarrée par: Jawitt le 31 Mars 2010, 13:37:26
-
Bonjour,
Je suis en train de créer mon propre GM, seulement j'ai un bug :
Je m'explique, je me suis enregistré, et sa a créer mon fichier .ini avec mon mot de passe dedans, bien correctement.. MAIS, lorsque j'entre un mauvais mot de passe, sa ne fais rien, voici la ligne de mon Connexion :
public Connexion(playerid,password[])
{
new string2[64];
new nomjoueurconnexion[MAX_PLAYER_NAME];
format(string2, sizeof(string2), "comptes/%s.ini", nomjoueurconnexion);
new File: UserFile = fopen(string2, io_read);
if ( UserFile )
{
new PassData[256];
new keytmp[256], valtmp[256];
fread( UserFile , PassData , sizeof( PassData ) );
keytmp = ini_GetKey( PassData );
if( strcmp( keytmp , "MDP" , true ) == 0 )
{
valtmp = ini_GetValue( PassData );
strmid(JoueurInfo[playerid][jMDP], valtmp, 0, strlen(valtmp)-1, 255);
}
if(strcmp(JoueurInfo[playerid][jMDP],password, true ) == 0 )
{
new key[ 256 ];
new Data[ 256 ];
while ( fread( UserFile , Data , sizeof( Data ) ) )
{
key = ini_GetKey( Data );
}
fclose(UserFile);
}
else
{
new connexionstring[128];
new nomconnexion[64];
GetPlayerName(playerid,nomconnexion,sizeof(nomconnexion));
format(connexionstring,sizeof(connexionstring),"Le mot de passe est incorrect\nMerci d'entrer le bon mot de passe:",nomconnexion);
ShowPlayerDialog(playerid,OUBLIE,DIALOG_STYLE_INPUT,".- Connection sur ***** -.",connexionstring,"Login","Quitter");
fclose(UserFile);
return 1;
}
}
return 1;
}
PS: Quand j'entre le bon mot de passe, il ne spawn pas..
-
Salut,
J'ai le même probleme sauf que moi..Quand j'entre le movais ou bon mot de passe, rien ne se passe..
Merci, D'avance..
-
tu aurais pus faire ton prorpre topic tout de meme m'enfin sans code on ne pourras pas t'aider