GTAOnline.net
San Andreas Multiplayer (sa:mp) => Scripting SA-MP [Pawn center] => Discussion démarrée par: Léopard le 13 Juillet 2010, 17:15:07
-
Bonjour à tous,
Voila j'aimerai passer ma version LVDM 1.0 en LVDM 1.1 mais il me manque plusieurs choses...
-Je voudrai savoir si il n'y a pas un tutoriel pour créer une commande /register et /login
-Une fonction /kill pour se tuer
merci de vos réponse :P
-
Bonjour,
Si tu peux passer ici, histoire qu'on sache un peu qui t'es: http://www.gtaonline.fr/forums/index.php/topic,59.1335.html (http://www.gtaonline.fr/forums/index.php/topic,59.1335.html)
Merci.
Quelqu'un devrait venir.
-
Voila, maintenant j'aimerai retourner a mon sujet pour ne pas faire du hors sujet :P
-
Pas de soucis.
Comme je te disais, quelqu'un devrait sous peu te filer un coup de main, beaucoup sont skilled dans ce domaine.
-
Merci
-
dans le tuto de register :
Nous commençons par créer une variable qui dit si le joueur est loggé :
nous l'appelons "IsPlayerLogged" et sa nous donne
Code: (pawn)
"" new IsPlayerLogged[MAX_PLAYERS]; ""
Il faut le mettre ou ?
-
Je ne comprends pas du tout :-\ je débute et comme je trouve qu'il ne dise pas ou mettre les codes bah....
-
apres pour mettre
enum PlayersInfo
{
Score, Argent, Skin, Arme1, Arme2, Arme3, Arme4, Arme5, Arme6, Arme7, Arme8, Arme9, Arme10, Arme11, Arme12,
Munitions1, Munitions2, Munitions3, Munitions4, Munitions5, Munitions6, Munitions7, Munitions8, Munitions9, Munitions10, Munitions11, Munitions12,
}
on le met en dessous de new se qui donne
new IsPlayerLogged[MAX_PLAYERS];
enum PlayersInfo
{
Score, Argent, Skin, Arme1, Arme2, Arme3, Arme4, Arme5, Arme6, Arme7, Arme8, Arme9, Arme10, Arme11, Arme12,
Munitions1, Munitions2, Munitions3, Munitions4, Munitions5, Munitions6, Munitions7, Munitions8, Munitions9, Munitions10, Munitions11, Munitions12,
}
?????? ceci est une question^^
EDIT : quand je les fait j'ai eu 1 warning -_-
-
C:\Users\msi\Desktop\LVDM\gamemodes\lvdm.pwn(965) : warning 203: symbol is never used: "IsPlayerLogged"
alors que la ligne 965 n'éxiste pas
EDIT : les news que tu a dit de les mettre je les mit là
new w1[MAX_PLAYERS],w2[MAX_PLAYERS],w3[MAX_PLAYERS],w4[MAX_PLAYERS],w5[MAX_PLAYERS],w6[MAX_PLAYERS],w7[MAX_PLAYERS],w8[MAX_PLAYERS],w9[MAX_PLAYERS],w10[MAX_PLAYERS],w11[MAX_PLAYERS],w12[MAX_PLAYERS];
new a1[MAX_PLAYERS],a2[MAX_PLAYERS],a3[MAX_PLAYERS],a4[MAX_PLAYERS],a5[MAX_PLAYERS],a6[MAX_PLAYERS],a7[MAX_PLAYERS],a8[MAX_PLAYERS],a9[MAX_PLAYERS],a10[MAX_PLAYERS],a11[MAX_PLAYERS],a12[MAX_PLAYERS];
new IsPlayerLogged[MAX_PLAYERS];
enum PlayersInfo
{
Score, Argent, Skin, Arme1, Arme2, Arme3, Arme4, Arme5, Arme6, Arme7, Arme8, Arme9, Arme10, Arme11, Arme12,
Munitions1, Munitions2, Munitions3, Munitions4, Munitions5, Munitions6, Munitions7, Munitions8, Munitions9, Munitions10, Munitions11, Munitions12,
}
-
j'ai terminé et me voila avec 26erreurs :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'(
http://pastebin.gtaonline.fr/pastebin.php?show=837 (http://pastebin.gtaonline.fr/pastebin.php?show=837) mon GM avec les 26erreurs j'ai bien suivit le tutoriel pourtant
-
Une accolade , hum... je cherche alors
-
Me revoila à 4erreurs
C:\Users\msi\Desktop\LVDM\gamemodes\lvdm.pwn(138) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\msi\Desktop\LVDM\gamemodes\lvdm.pwn(139) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\msi\Desktop\LVDM\gamemodes\lvdm.pwn(176) : warning 219: local variable "message" shadows a variable at a preceding level
C:\Users\msi\Desktop\LVDM\gamemodes\lvdm.pwn(200) : error 003: declaration of a local variable must appear in a compound block
C:\Users\msi\Desktop\LVDM\gamemodes\lvdm.pwn(200) : error 017: undefined symbol "file"
C:\Users\msi\Desktop\LVDM\gamemodes\lvdm.pwn(200) : warning 215: expression has no effect
C:\Users\msi\Desktop\LVDM\gamemodes\lvdm.pwn(200) : error 001: expected token: ";", but found "]"
C:\Users\msi\Desktop\LVDM\gamemodes\lvdm.pwn(200) : fatal error 107: too many error messages on one line
dont un fatal error
je sais juste qu'il y a des erreurs par là :
public OnPlayerDisconnect(playerid)
{
if(IsPlayerLogged[playerid] == 1) //si le joueur est loggé lors de sa déconnexion
new file[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(file,sizeof(file),"User/%s.ini",file);
if(fexist(file))
}
{
dini_Set(file,"Score", GetPlayerScore(playerid));
dini_Set(file,"Argent", GetPlayerMoney(playerid));
dini_Set(file,"Skin", GetPlayerSkin(playerid));
dini_Set(file,"Arme1", w1[playerid]);
dini_Set(file,"Arme2", w2[playerid]);
dini_IntSet(file,"Arme3", w3[playerid]);
dini_IntSet(file,"Arme4", w4[playerid]);
dini_Set(file,"Arme5", w5[playerid]);
dini_Set(file,"Arme6", w6[playerid]);
dini_IntSet(file,"Arme7", w7[playerid]);
dini_Set(file,"Arme8", w8[playerid]);
dini_IntSet(file,"Arme9", w9[playerid]);
dini_Int(file,"Arme10", w10[playerid]);
dini_IntSet(file,"Arme11", w11[playerid]);
dini_Set(file,"Arme12", w12[playerid]);
dini_IntSet(file,"Munitions1", a1[playerid]);
dini_Int(file,"Munitions2", a2[playerid]);
dini_IntSet(file,"Munitions3", a3[playerid]);
dini_Set(file,"Munitions4", a4[playerid]);
dini_Set(file,"Munitions5", a5[playerid]);
dini_Int(file,"Munitions6", a6[playerid]);
dini_Int(file,"Munitions7", a7[playerid]);
dini_Set(file,"Munitions8", a8[playerid]);
dini_Set(file,"Munitions9", a9[playerid]);
dini_Set(file,"Munitions10", a10[playerid]);
dini_Set(file,"Munitions11", a11[playerid]);
dini_Set(file,"Munitions12", a12[playerid]);
}
IsPlayerLogged[playerid] = 0; //une fois déconnecté le joueur n'est plus loggé
}
return 1;
}
new message[127];
GetPlayerName(playerid, message, sizeof(message));
format(message,sizeof(message), "%s (ID: %d) a quitté le server !", message, playerid);
SendClientMessageToAll(0xAA3333AA, message);
gActivePlayers[playerid]--;
}
-
new file[128];
-
Ah non quel bête je l'avais oublié ;D ;D
J'ai compile mais maintenant me voila avec la fatal erreur ou il manque le fichier dutils dans include et quand je le met j'ai 4erreurs et plein de warning
C:\Users\msi\Desktop\LVDM\pawno\include\dutils.inc(28) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\msi\Desktop\LVDM\pawno\include\dutils.inc(132) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\msi\Desktop\LVDM\pawno\include\dutils.inc(172) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\msi\Desktop\LVDM\pawno\include\dutils.inc(267) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\msi\Desktop\LVDM\pawno\include\dutils.inc(285) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\Users\msi\Desktop\LVDM\pawno\include\dutils.inc(324) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\msi\Desktop\LVDM\pawno\include\dutils.inc(366) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\msi\Desktop\LVDM\pawno\include\dutils.inc(449) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\Users\msi\Desktop\LVDM\pawno\include\dini.inc(46) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\Users\msi\Desktop\LVDM\pawno\include\dini.inc(54) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\Users\msi\Desktop\LVDM\gamemodes\lvdm.pwn(140) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\msi\Desktop\LVDM\gamemodes\lvdm.pwn(141) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\msi\Desktop\LVDM\gamemodes\lvdm.pwn(178) : warning 219: local variable "message" shadows a variable at a preceding level
C:\Users\msi\Desktop\LVDM\gamemodes\lvdm.pwn(202) : error 003: declaration of a local variable must appear in a compound block
C:\Users\msi\Desktop\LVDM\gamemodes\lvdm.pwn(202) : error 017: undefined symbol "file"
C:\Users\msi\Desktop\LVDM\gamemodes\lvdm.pwn(202) : warning 215: expression has no effect
C:\Users\msi\Desktop\LVDM\gamemodes\lvdm.pwn(202) : error 001: expected token: ";", but found "]"
C:\Users\msi\Desktop\LVDM\gamemodes\lvdm.pwn(202) : fatal error 107: too many error messages on one line
et la ligne 202 est toujours la même que l'autre
mon gm : http://pastebin.gtaonline.fr/pastebin.php?show=838 (http://pastebin.gtaonline.fr/pastebin.php?show=838)