18.05.2013, 17:37
Verry nice and good tutorial. I used it on my stunt server i haved.
D:\samp03x_svr_R1-2_win32\gamemodes\gangwar.pwn(16 : error 017: undefined symbol "UserPath" D:\samp03x_svr_R1-2_win32\gamemodes\gangwar.pwn(170) : error 017: undefined symbol "UserPath" D:\samp03x_svr_R1-2_win32\gamemodes\gangwar.pwn(171) : error 017: undefined symbol "DIALOG_LOGIN" D:\samp03x_svr_R1-2_win32\gamemodes\gangwar.pwn(171) : error 017: undefined symbol "COL_WHITE" D:\samp03x_svr_R1-2_win32\gamemodes\gangwar.pwn(171) : warning 215: expression has no effect D:\samp03x_svr_R1-2_win32\gamemodes\gangwar.pwn(171) : error 001: expected token: "-string end-", but found "-identifier-" D:\samp03x_svr_R1-2_win32\gamemodes\gangwar.pwn(171) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 6 Errors. |
*** YSI Error: INI_Open could not find or create file Users/Georgi166.ini
C:\Users\HP\Desktop\pawno\gamemodes\test.pwn(214) : error 017: undefined symbol "PlayerInfo" C:\Users\HP\Desktop\pawno\gamemodes\test.pwn(214) : warning 215: expression has no effect C:\Users\HP\Desktop\pawno\gamemodes\test.pwn(214) : error 001: expected token: ";", but found "]" C:\Users\HP\Desktop\pawno\gamemodes\test.pwn(214) : error 029: invalid expression, assumed zero C:\Users\HP\Desktop\pawno\gamemodes\test.pwn(214) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors. |
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_REGISTER:
{
if(!response) return Kick(playerid);
if(response)
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""COL_WHITE"Enregistrement",""COL_RED"Il faut inserer un mot de passe !\n"COL_WHITE"Entrez votre password ci dessous pour enregistrer votre compte","Valider","Quitter");
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File, "DONNEES");
INI_WriteInt(File, "Mot de passe", udb_hash(inputtext));
INI_WriteInt(File,"Argent",0);
INI_WriteInt(File,"Skin",0);
INI_WriteInt(File,"Tue",0);
INI_WriteInt(File,"Mort",0);
INI_Close(File);
ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COL_WHITE"Validй !",""COL_GREEN"Bienvenue ! Reconnectez vous pour sauvegarder vos stats","Ok","");
}
}
case DIALOG_LOGIN:
{
if(!response) return Kick(playerid);
if(response)
{
if(udb_hash(inputtext) == PlayerInfo[playerid][pMdp])
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
GivePlayerMoney(playerid, PlayerInfo[playerid][pArgent]);
SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,""COL_WHITE"Validй!",""COL_GREEN"Connexion rйussie ! Bon jeu !","Ok","");
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_RED"Vous avez entrй un mot de passe incorrect.\n"COL_WHITE"Entre votre mot de passe ci dessous pour vous connecter.","Login","Quitter");
}
return 1;
}
}
}
return 1;
INI_WriteInt(File,"Cash",5000); INI_WriteInt(File,"Admin",0); INI_WriteInt(File,"Kills",0); INI_WriteInt(File,"Deaths",0); INI_WriteInt(File,"Skin",264); |