Please Help me +REP
#1

Heyy Any One Help Me In ladmin There is command of /register and /login Can Any One know how to make it login dialog Box Pleasssssee Help me +REP
Reply
#2

No One
Reply
#3

make 2 dialogs 1-login and 2-register type them into OnPlayerConnect and on OnDialogResponse type your code for commands login and register
Reply
#4

Please ,, And Ty Soo MuCh in adwanCe .. Please make it
PHP код:
//====================== [REGISTER  &  LOGIN] ==================================
CMD:register(playerid,params[])
{
    if (
PlayerInfo[playerid][LoggedIn] == 1) return SendClientMessage(playerid,COLOR_RED,"ACCOUNT: You are already registered and logged in.");
    if (
udb_Exists(PlayerName2(playerid))) return SendClientMessage(playerid,COLOR_RED,"ACCOUNT: This account already exists, please use '/login [password]'.");
    if (
strlen(params) == 0) return SendClientMessage(playerid,COLOR_RED,"ACCOUNT: Correct usage: '/register [password]'");
    if (
strlen(params) < || strlen(params) > 20) return SendClientMessage(playerid,COLOR_RED,"ACCOUNT: Password length must be greater than three characters");
    if (
udb_Create(PlayerName2(playerid),params))
    {
        new 
file[256],rname[MAX_PLAYER_NAME], tmp3[100];
        new 
strdate[20], year,month,day;
        
getdate(yearmonthday);
        
GetPlayerName(playerid,rname,sizeof(rname));
        
format(file,sizeof(file),"/ladmin/users/%s.sav",udb_encode(rname));
         
GetPlayerIp(playerid,tmp3,100);
        
dini_Set(file,"ip",tmp3);
//        dini_Set(file,"password",params);
        
dUserSetINT(PlayerName2(playerid)).("registered",1);
           
format(strdatesizeof(strdate), "%d/%d/%d",day,month,year);
        
dini_Set(file,"RegisteredDate",strdate);
        
dUserSetINT(PlayerName2(playerid)).("loggedin",1);
        
dUserSetINT(PlayerName2(playerid)).("banned",0);
        
dUserSetINT(PlayerName2(playerid)).("level",0);
        
dUserSetINT(PlayerName2(playerid)).("LastOn",0);
        
dUserSetINT(PlayerName2(playerid)).("money",0);
        
dUserSetINT(PlayerName2(playerid)).("kills",0);
           
dUserSetINT(PlayerName2(playerid)).("deaths",0);
        
dUserSetINT(PlayerName2(playerid)).("Bank",PlayerInfo[playerid][bank]);
        
dUserSetINT(PlayerName2(playerid)).("weed",PlayerInfo[playerid][weed]);
        
dUserSetINT(PlayerName2(playerid)).("Gang",PlayerInfo[playerid][gang]);
        
dUserSetINT(PlayerName2(playerid)).("Condoms",PlayerInfo[playerid][condoms]);
        
dUserSetINT(PlayerName2(playerid)).("inalcatraz",PlayerInfo[playerid][inalcatraz]);
        
PlayerInfo[playerid][LoggedIn] = 1;
        
PlayerInfo[playerid][Registered] = 1;
        
SavePlayer(playerid);
        
dUserSetINT(PlayerName2(playerid)).("bowner",0);
        
dUserSetINT(PlayerName2(playerid)).("bowned",0);
           
dUserSetINT(PlayerName2(playerid)).("vowned",0);
           
dUserSetINT(PlayerName2(playerid)).("vowner",0);
           
dUserSetINT(PlayerName2(playerid)).("vowned2",0);
           
dUserSetINT(PlayerName2(playerid)).("vowner2",0);
           
dUserSetINT(PlayerName2(playerid)).("vowned3",0);
           
dUserSetINT(PlayerName2(playerid)).("vowner3",0);
           
dUserSetINT(PlayerName2(playerid)).("vowned4",0);
           
dUserSetINT(PlayerName2(playerid)).("vowner4",0);
           
dUserSetINT(PlayerName2(playerid)).("vowned5",0);
           
dUserSetINT(PlayerName2(playerid)).("vowner5",0);
           
dUserSetINT(PlayerName2(playerid)).("vowned6",0);
           
dUserSetINT(PlayerName2(playerid)).("vowner6",0);
           
dUserSetINT(PlayerName2(playerid)).("vowned7",0);
           
dUserSetINT(PlayerName2(playerid)).("vowner7",0);
           
dUserSetINT(PlayerName2(playerid)).("vowned8",0);
           
dUserSetINT(PlayerName2(playerid)).("vowner8",0);
           
dUserSetINT(PlayerName2(playerid)).("vowned9",0);
           
dUserSetINT(PlayerName2(playerid)).("vowner9",0);
           
dUserSetINT(PlayerName2(playerid)).("vowned10",0);
           
dUserSetINT(PlayerName2(playerid)).("vowner10",0);
           
dUserSetINT(PlayerName2(playerid)).("vowned11",0);
           
dUserSetINT(PlayerName2(playerid)).("vowner11",0);
           
dUserSetINT(PlayerName2(playerid)).("vowned12",0);
           
dUserSetINT(PlayerName2(playerid)).("vowner12",0);
           
dUserSetINT(PlayerName2(playerid)).("Houseid", -255);
        
dUserSetINT(PlayerName2(playerid)).("Rentid", -255);
        
dUserSetINT(PlayerName2(playerid)).("SpawnX"0);
        
dUserSetINT(PlayerName2(playerid)).("SpawnY"0);
        
dUserSetINT(PlayerName2(playerid)).("SpawnZ"0);
        
dUserSetINT(PlayerName2(playerid)).("SpawnInt"0);
        
LoginPlayer(playerid);
        
LoadPlayer(playerid);
        
SendClientMessage(playeridgreen"ACCOUNT: You are now registered, and have been automaticaly logged in");
        
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
        return 
1;
    }
    return 
1;
}

CMD:login(playerid,params[])
{
    if (
PlayerInfo[playerid][LoggedIn] == 1) return SendClientMessage(playerid,COLOR_RED,"ACCOUNT: You are already logged in.");
    if (!
udb_Exists(PlayerName2(playerid))) return SendClientMessage(playerid,COLOR_RED,"ACCOUNT: Account doesn't exist, please use '/register [password]'.");
    if (
strlen(params)==0) return SendClientMessage(playerid,COLOR_RED,"ACCOUNT: Correct usage: '/login [password]'");
    if (
udb_CheckLogin(PlayerName2(playerid),params))
    {
           new 
file[256], tmp3[100], string[128], lname[MAX_PLAYER_NAME];
        
GetPlayerName(playerid,lname,sizeof(lname));
           
format(file,sizeof(file),"/ladmin/users/%s.sav",udb_encode(lname));
           
GetPlayerIp(playerid,tmp3,100);
           
dini_Set(file,"ip",tmp3);
        
LoginPlayer(playerid);
        
LoadPlayer(playerid);
        
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
        if(
PlayerInfo[playerid][Level] > 0) {
            
format(string,sizeof(string),"ACCOUNT: Successfully Logged In. (Level %d)"PlayerInfo[playerid][Level] );
            return 
SendClientMessage(playerid,green,string);
           } else return 
SendClientMessage(playerid,green,"ACCOUNT: Successfully Logged In");
    }
    return 
SendClientMessage(playerid,COLOR_RED,"ACCOUNT: Login failed! Incorrect Password");
}

LoginPlayer(playerid)
{
    if(
ServerInfo[GiveMoney] == 1) {ResetPlayerMoney(playerid); GivePlayerMoney(playeriddUserINT(PlayerName2(playerid)).("money") ); }
    
dUserSetINT(PlayerName2(playerid)).("loggedin",1);
    
PlayerInfo[playerid][Deaths] = (dUserINT(PlayerName2(playerid)).("deaths"));
    
PlayerInfo[playerid][Kills] = (dUserINT(PlayerName2(playerid)).("kills"));
     
PlayerInfo[playerid][Level] = (dUserINT(PlayerName2(playerid)).("level"));
    
PlayerInfo[playerid][Registered] = 1;
     
PlayerInfo[playerid][LoggedIn] = 1;

Reply
#5

pawn Код:
C:\Users\Arish\Desktop\Important\My Server Completed\pawno\include\dutils.inc(28) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Arish\Desktop\Important\My Server Completed\pawno\include\dutils.inc(132) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Arish\Desktop\Important\My Server Completed\pawno\include\dutils.inc(172) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Arish\Desktop\Important\My Server Completed\pawno\include\dutils.inc(280) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Arish\Desktop\Important\My Server Completed\pawno\include\dutils.inc(298) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\Users\Arish\Desktop\Important\My Server Completed\pawno\include\dutils.inc(337) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Arish\Desktop\Important\My Server Completed\pawno\include\dutils.inc(399) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Arish\Desktop\Important\My Server Completed\pawno\include\dutils.inc(463) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\Users\Arish\Desktop\Important\My Server Completed\pawno\include\dini.inc(239) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Arish\Desktop\Important\My Server Completed\pawno\include\Ldudb.inc(48) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\Users\Arish\Desktop\Important\My Server Completed\pawno\include\Ldudb.inc(99) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\Users\Arish\Desktop\Important\My Server Completed\pawno\include\zcmd.inc(90) : warning 219: local variable "pos" shadows a variable at a preceding level
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(2282) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(2371) : warning 219: local variable "pos" shadows a variable at a preceding level
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(2413) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(2427) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(2450) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(2458) : error 035: argument type mismatch (argument 1)
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(2473) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(2475) : error 035: argument type mismatch (argument 1)
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(2486) : warning 219: local variable "pos" shadows a variable at a preceding level
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(2492) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(18419) : warning 219: local variable "pos" shadows a variable at a preceding level
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(18640) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(18672) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(18682) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(18713) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(18723) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(18768) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(18917) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(19033) : error 017: undefined symbol "DIALOG_STYPE_PASSWORD"
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(19034) : error 029: invalid expression, assumed zero
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(19036) : error 017: undefined symbol "DIALOG_STYPE_PASSWORD"
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(19038) : warning 217: loose indentation
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(19042) : error 010: invalid function or declaration
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(19059) : error 010: invalid function or declaration
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(19069) : error 010: invalid function or declaration
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(19075) : error 021: symbol already defined: "TextDrawShowForPlayer"
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(19080) : error 021: symbol already defined: "GetPlayerName"
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(19081) : error 021: symbol already defined: "GetPlayerIp"
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(19082) : error 010: invalid function or declaration
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(19087) : error 021: symbol already defined: "print"
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(19089) : error 010: invalid function or declaration
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(19094) : error 021: symbol already defined: "print"
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(19095) : error 010: invalid function or declaration
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(19097) : error 010: invalid function or declaration
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(19100) : error 021: symbol already defined: "GetPlayerIp"
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(19107) : error 010: invalid function or declaration
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(19112) : error 021: symbol already defined: "Kick"
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(19115) : error 010: invalid function or declaration
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(19116) : error 010: invalid function or declaration
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(19117) : error 010: invalid function or declaration
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(19121) : error 021: symbol already defined: "Kick"
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(19122) : error 010: invalid function or declaration
C:\Users\Arish\Desktop\Important\My Server Completed\Gamemodes\TaC-TDM.pwn(19127) : error 010: invalid function or declaration

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


26 Errors.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)