23.06.2015, 08:27
Hello,
can anyone help me to create a register & login system for me please
i will +rep you
can anyone help me to create a register & login system for me please
i will +rep you
C:\Users\Administrator\Desktop\Freeroam\gamemodes\freeroam.pwn(82) : error 017: undefined symbol "UserPath" C:\Users\Administrator\Desktop\Freeroam\gamemodes\freeroam.pwn(84) : error 017: undefined symbol "UserPath" C:\Users\Administrator\Desktop\Freeroam\gamemodes\freeroam.pwn(85) : error 017: undefined symbol "DIALOG_LOGIN" C:\Users\Administrator\Desktop\Freeroam\gamemodes\freeroam.pwn(85) : error 017: undefined symbol "COL_WHITE" C:\Users\Administrator\Desktop\Freeroam\gamemodes\freeroam.pwn(85) : warning 215: expression has no effect C:\Users\Administrator\Desktop\Freeroam\gamemodes\freeroam.pwn(85) : error 001: expected token: "-string end-", but found "-identifier-" C:\Users\Administrator\Desktop\Freeroam\gamemodes\freeroam.pwn(85) : fatal error 107: too many error messages on one line
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Registering...",""COL_WHITE"Type your password below to register a new account.","Register","Quit");
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
if(fexist(UserPath(playerid)))
UserPath(playerid)
{
new
playername[MAX_PLAYER_NAME],
string[50];
format(string, sizeof(string), PATH, playername);
return string;
}
#define DIALOG_LOGIN 2
#define COL_WHITE "{FFFFFF}"
#define DIALOG_REGISTER 1 #define DIALOG_LOGIN 2 #define DIALOG_SUCCESS_1 3 #define DIALOG_SUCCESS_2 4 #define PATH "scriptfiles/Users/%s.ini" #define COL_WHITE "{FFFFFF}" #define COL_RED "{F81414}" #define COL_GREEN "{00FF22}" #define COL_LIGHTBLUE "{00CED1}" enum pInfo { pPass, pCash, pAdmin, pKills, pDeaths } new PlayerInfo[MAX_PLAYERS][pInfo]; forward LoadUser_data(playerid,name[],value[]); public LoadUser_data(playerid,name[],value[]) { INI_Int("Password",PlayerInfo[playerid][pPass]); INI_Int("Cash",PlayerInfo[playerid][pCash]); INI_Int("Admin",PlayerInfo[playerid][pAdmin]); INI_Int("Kills",PlayerInfo[playerid][pKills]); INI_Int("Deaths",PlayerInfo[playerid][pDeaths]); return 1; } stock UserPath(playerid) { new string[128],playername[MAX_PLAYER_NAME]; GetPlayerName(playerid,playername,sizeof(playername)); format(string,sizeof(string),PATH,playername); return string; } /*Credits to Dracoblue*/ stock udb_hash(buf[]) { new length=strlen(buf); new s1 = 1; new s2 = 0; new n; for (n=0; n<length; n++) { s1 = (s1 + buf[n]) % 65521; s2 = (s2 + s1) % 65521; } return (s2 << 16) + s1; }