SA-MP Forums

Go Back   SA-MP Forums > Non-English > Old Languages Archive > Français/French

 
 
Thread Tools Display Modes
Old 24/08/2010, 02:57 PM   #1
Dany_Wolf
Big Clucker
 
Join Date: Aug 2010
Posts: 74
Reputation: 1
Default [Aide] Pour commande /login /register

Bonjour,

désolé de venir comme sa, je suis nouveau sur ce forum.

je recherche une ou des personnes simpathique qui pourrait m'aider pour créer les commandes /loggin et /register.


Mon GM est basé sur LVDM.
Comme j'ai lu sur plusieurs topic qu'il été préférable de commencer par un serveur DM j'ai donc suivi le conseils.

dessus j'ai creer le mode Admin (pour le Rcon parce que apres je sais pas comment faire ^^), les armes, à l'aide de FS j'ai repris le Cadmin et le PM.

J'ai pris un FS qui s'appel 'register by C30' mais il n'est apparement pas compatible au GM LVDM.

Merci de votre patience.

[I]P.S : dois-je me présenter quelque part? si oui pardoné moi ce topic avant de m'avoir présenter.[/I]
Dany_Wolf is offline  
Old 24/08/2010, 03:19 PM   #2
Varkoll_
High-roller
 
Varkoll_'s Avatar
 
Join Date: Dec 2009
Location: Peut-être pas sur Terre ?
Posts: 1,940
Reputation: 61
Default Re : [Aide] Pour commande /login /register

Voici la réponse a ta question : [url]http://forum.sa-mp.com/showthread.php?t=101560&highlight=[/url][Tutorial] il te faut l'include dini je crois !


(P.S: Tu n'a pas vraiment besoin de te présenter avant de poster, c'est un forum d'entraide, c'est donc avec joie que j'ai répondu a ta question ^^)
__________________
Varkoll_ is offline  
Old 24/08/2010, 04:21 PM   #3
Dany_Wolf
Big Clucker
 
Join Date: Aug 2010
Posts: 74
Reputation: 1
Default Re: [Aide] Pour commande /login /register

Merci beaucoup je regarde sa !
Dany_Wolf is offline  
Old 24/08/2010, 05:02 PM   #4
Varkoll_
High-roller
 
Varkoll_'s Avatar
 
Join Date: Dec 2009
Location: Peut-être pas sur Terre ?
Posts: 1,940
Reputation: 61
Default Re : [Aide] Pour commande /login /register

Ok c'est bon sa marche ?
__________________
Varkoll_ is offline  
Old 24/08/2010, 05:34 PM   #5
Dany_Wolf
Big Clucker
 
Join Date: Aug 2010
Posts: 74
Reputation: 1
Default Re: [Aide] Pour commande /login /register

mon ordinateur à un peu de mal je te dirais sa demain.

Merci encore !
Dany_Wolf is offline  
Old 24/08/2010, 06:21 PM   #6
Varkoll_
High-roller
 
Varkoll_'s Avatar
 
Join Date: Dec 2009
Location: Peut-être pas sur Terre ?
Posts: 1,940
Reputation: 61
Default Re : [Aide] Pour commande /login /register

ok derien
__________________
Varkoll_ is offline  
Old 25/08/2010, 11:46 AM   #7
Dany_Wolf
Big Clucker
 
Join Date: Aug 2010
Posts: 74
Reputation: 1
Default Re: [Aide] Pour commande /login /register

Bonjour,

j'ai essayer le petit tutorial mais apparement sa ne fonctionne pas, sa me met 17 erreurs.

Les voiçi :

Edit, j'ai reduit les erreurs à sa :

C:\Users\Damien\Desktop\Rockstar Games\GTA San Andreas\Miami\Miami\gamemodes\lvdm.pwn(139) : error 017: undefined symbol "name"
C:\Users\Damien\Desktop\Rockstar Games\GTA San Andreas\Miami\Miami\gamemodes\lvdm.pwn(139) : error 017: undefined symbol "name"
C:\Users\Damien\Desktop\Rockstar Games\GTA San Andreas\Miami\Miami\gamemodes\lvdm.pwn(139) : error 029: invalid expression, assumed zero
C:\Users\Damien\Desktop\Rockstar Games\GTA San Andreas\Miami\Miami\gamemodes\lvdm.pwn(139) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Dany_Wolf is offline  
Old 25/08/2010, 05:00 PM   #8
Dany_Wolf
Big Clucker
 
Join Date: Aug 2010
Posts: 74
Reputation: 1
Default Re: [Aide] Pour commande /login /register

apres avoir tenté, sa me met des erreur a propos de idx ou tmp2 ^^'
Dany_Wolf is offline  
Old 25/08/2010, 05:32 PM   #9
Varkoll_
High-roller
 
Varkoll_'s Avatar
 
Join Date: Dec 2009
Location: Peut-être pas sur Terre ?
Posts: 1,940
Reputation: 61
Default Re : [Aide] Pour commande /login /register

Tu les a définies dans ton scripte ? Est ce que je peut voir on scripte ?
__________________
Varkoll_ is offline  
Old 26/08/2010, 09:02 AM   #10
Dany_Wolf
Big Clucker
 
Join Date: Aug 2010
Posts: 74
Reputation: 1
Default Re: [Aide] Pour commande /login /register

oui j'avais definie Dini et Dudb comme dans le tuto !
Met les erreurs viennent du mode de jeu de mon GM c'est ici :

[quote]public MoneyGrubScoreUpdate()
{
new CashScore;
new Name[MAX_PLAYER_NAME];
//new string[256];
for(new i=0; i<MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
GetPlayerName(i, name, sizeof name));
CashScore = GetPlayerMoney(i);
SetPlayerScore(i, CashScore);
if (CashScore > CashScoreOld)
{
CashScoreOld = CashScore;
//format(string, sizeof(string), "$$$ %s is now in the lead $$$", name);
//SendClientMessageToAll(COLOR_YELLOW, string);
}
}
}
}[/quote]

[B]Edit :[/B]

j'ai mis les includes

[quote]#include<samp>
#include<dini>
#include<dudb>[/quote]

ensuite en dessous j'ai mis

[quote]new IsLogged[MAX_PLAYERS];

enum pInfo
{

}
new PlayerInfo[MAX_PLAYERS][pInfo];[/quote]

dans OnPlayerDisconnect j'ai mis
[quote]IsLogged[playerid] = 0;[/quote]

Ensuite dans OnPlayerCommandText j'ai mis comme demander

[quote]new cmd[256], idx, file[128], tmp[256], tmp2[256];
cmd = strtok(cmdtext, idx);

if(strcmp(cmd, "/register", true) == 0)
{
new name[MAX_PLAYER_NAME];
tmp = strtok(cmdtext, idx);
GetPlayerName(playerid, name, sizeof(name));
if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /register [password]");
format(file,sizeof(file),"%s.ini",name);
if(!fexist(file))
{
dini_Create(file);
dini_IntSet(file, "Password", udb_hash(tmp));
dini_IntSet(file,"AdminLevel", 0);
dini_IntSet(file,"Cash", 0);
SendClientMessage(playerid, eadmin, "[System]: Account Created!");
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
GetPlayerName(playerid, name, sizeof(name));
printf("%s has registered a account!", name);
}
else
{
SendClientMessage(playerid, COLOR, " Account Already Found In Database");
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
}
return 1;
}
return 0;
}
if(strcmp(cmd, "/login", true) == 0)
{
new PlayerName[24];
tmp = strtok(cmdtext, idx);
if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /login [password]");
new name[MAX_PLAYER_NAME];
if(IsLogged[playerid] == 1)
{
SendClientMessage(playerid, COLOR, "You already are logged in!");
return 1;
}
else
{
GetPlayerName(playerid, name, sizeof(name));
format(file,sizeof(file),"%s.ini",name);
if(fexist(file))
{
tmp2 = dini_Get(file, "Password");
if(udb_hash(tmp) != strval(tmp2))
{
SendClientMessage(playerid, COLOR, "Login Failed!");
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
printf("%s has failed to login", name);
}
else
{
IsLogged[playerid] = 1;
SetPlayerMoney(playerid, dini_Int(file, "Cash"));
PlayerInfo[playerid][AdminLevel] = dini_Int(file, "AdminLevel");
SendClientMessage(playerid, COLOR, "[System]: Account Logged into!");
}
}
}
return 1;
}[/quote]

et au total j'ai 18 erreurs :

[quote]C:\Users\Damien\Desktop\Rockstar Games\GTA San Andreas\Miami\Miami\pawno\include\dutils.inc(298) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\Users\Damien\Desktop\Rockstar Games\GTA San Andreas\Miami\Miami\pawno\include\dutils.inc(462) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\Users\Damien\Desktop\Rockstar Games\GTA San Andreas\Miami\Miami\pawno\include\dini.inc(46) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\Users\Damien\Desktop\Rockstar Games\GTA San Andreas\Miami\Miami\samp03bsvr_RC1_1_win32\gamemodes\lvdm - Copie.pwn(119) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\Damien\Desktop\Rockstar Games\GTA San Andreas\Miami\Miami\samp03bsvr_RC1_1_win32\gamemodes\lvdm - Copie.pwn(175) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\Users\Damien\Desktop\Rockstar Games\GTA San Andreas\Miami\Miami\samp03bsvr_RC1_1_win32\gamemodes\lvdm - Copie.pwn(181) : error 021: symbol already defined: "cmd"
C:\Users\Damien\Desktop\Rockstar Games\GTA San Andreas\Miami\Miami\samp03bsvr_RC1_1_win32\gamemodes\lvdm - Copie.pwn(182) : error 021: symbol already defined: "idx"
C:\Users\Damien\Desktop\Rockstar Games\GTA San Andreas\Miami\Miami\samp03bsvr_RC1_1_win32\gamemodes\lvdm - Copie.pwn(188) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\Damien\Desktop\Rockstar Games\GTA San Andreas\Miami\Miami\samp03bsvr_RC1_1_win32\gamemodes\lvdm - Copie.pwn(196) : error 017: undefined symbol "udb_hash"
C:\Users\Damien\Desktop\Rockstar Games\GTA San Andreas\Miami\Miami\samp03bsvr_RC1_1_win32\gamemodes\lvdm - Copie.pwn(199) : error 017: undefined symbol "eadmin"
C:\Users\Damien\Desktop\Rockstar Games\GTA San Andreas\Miami\Miami\samp03bsvr_RC1_1_win32\gamemodes\lvdm - Copie.pwn(206) : error 017: undefined symbol "COLOR"
C:\Users\Damien\Desktop\Rockstar Games\GTA San Andreas\Miami\Miami\samp03bsvr_RC1_1_win32\gamemodes\lvdm - Copie.pwn(182) : warning 203: symbol is never used: "moneys"
C:\Users\Damien\Desktop\Rockstar Games\GTA San Andreas\Miami\Miami\samp03bsvr_RC1_1_win32\gamemodes\lvdm - Copie.pwn(182) : warning 203: symbol is never used: "giveplayerid"
C:\Users\Damien\Desktop\Rockstar Games\GTA San Andreas\Miami\Miami\samp03bsvr_RC1_1_win32\gamemodes\lvdm - Copie.pwn(180) : warning 204: symbol is assigned a value that is never used: "giveplayer"
C:\Users\Damien\Desktop\Rockstar Games\GTA San Andreas\Miami\Miami\samp03bsvr_RC1_1_win32\gamemodes\lvdm - Copie.pwn(179) : warning 204: symbol is assigned a value that is never used: "sendername"
C:\Users\Damien\Desktop\Rockstar Games\GTA San Andreas\Miami\Miami\samp03bsvr_RC1_1_win32\gamemodes\lvdm - Copie.pwn(178) : warning 203: symbol is never used: "playermoney"
C:\Users\Damien\Desktop\Rockstar Games\GTA San Andreas\Miami\Miami\samp03bsvr_RC1_1_win32\gamemodes\lvdm - Copie.pwn(177) : warning 204: symbol is assigned a value that is never used: "string"
C:\Users\Damien\Desktop\Rockstar Games\GTA San Andreas\Miami\Miami\samp03bsvr_RC1_1_win32\gamemodes\lvdm - Copie.pwn(175) : warning 204: symbol is assigned a value that is never used: "tmp2"
C:\Users\Damien\Desktop\Rockstar Games\GTA San Andreas\Miami\Miami\samp03bsvr_RC1_1_win32\gamemodes\lvdm - Copie.pwn(175 -- 213) : error 010: invalid function or declaration
C:\Users\Damien\Desktop\Rockstar Games\GTA San Andreas\Miami\Miami\samp03bsvr_RC1_1_win32\gamemodes\lvdm - Copie.pwn(216) : error 010: invalid function or declaration
C:\Users\Damien\Desktop\Rockstar Games\GTA San Andreas\Miami\Miami\samp03bsvr_RC1_1_win32\gamemodes\lvdm - Copie.pwn(217) : error 010: invalid function or declaration
C:\Users\Damien\Desktop\Rockstar Games\GTA San Andreas\Miami\Miami\samp03bsvr_RC1_1_win32\gamemodes\lvdm - Copie.pwn(219) : error 010: invalid function or declaration
C:\Users\Damien\Desktop\Rockstar Games\GTA San Andreas\Miami\Miami\samp03bsvr_RC1_1_win32\gamemodes\lvdm - Copie.pwn(222) : error 010: invalid function or declaration
C:\Users\Damien\Desktop\Rockstar Games\GTA San Andreas\Miami\Miami\samp03bsvr_RC1_1_win32\gamemodes\lvdm - Copie.pwn(224) : error 010: invalid function or declaration
C:\Users\Damien\Desktop\Rockstar Games\GTA San Andreas\Miami\Miami\samp03bsvr_RC1_1_win32\gamemodes\lvdm - Copie.pwn(228) : error 010: invalid function or declaration
C:\Users\Damien\Desktop\Rockstar Games\GTA San Andreas\Miami\Miami\samp03bsvr_RC1_1_win32\gamemodes\lvdm - Copie.pwn(231) : error 010: invalid function or declaration
C:\Users\Damien\Desktop\Rockstar Games\GTA San Andreas\Miami\Miami\samp03bsvr_RC1_1_win32\gamemodes\lvdm - Copie.pwn(237) : error 010: invalid function or declaration
C:\Users\Damien\Desktop\Rockstar Games\GTA San Andreas\Miami\Miami\samp03bsvr_RC1_1_win32\gamemodes\lvdm - Copie.pwn(240) : error 021: symbol already defined: "SetPlayerMoney"
C:\Users\Damien\Desktop\Rockstar Games\GTA San Andreas\Miami\Miami\samp03bsvr_RC1_1_win32\gamemodes\lvdm - Copie.pwn(240) : error 010: invalid function or declaration
C:\Users\Damien\Desktop\Rockstar Games\GTA San Andreas\Miami\Miami\samp03bsvr_RC1_1_win32\gamemodes\lvdm - Copie.pwn(240 -- 246) : error 010: invalid function or declaration
C:\Users\Damien\Desktop\Rockstar Games\GTA San Andreas\Miami\Miami\samp03bsvr_RC1_1_win32\gamemodes\lvdm - Copie.pwn(240 -- 246) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


18 Errors.[/quote]

[B]Double Edit :[/B]

je n'est pas changer la couleur je sais mais c'est volontaire, bisarement aucune erreurs venant des couleurs :s

Last edited by Dany_Wolf; 26/08/2010 at 09:28 AM.
Dany_Wolf is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is Off
Smilies are Off
[IMG] code is Off
HTML code is Off



All times are GMT. The time now is 03:21 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.