changename ladmin4v2
#1

Hey there!
Im using newest script from ladmin but its old script in forum. I want to get changename command for it.. i searched in forum and found solution for luxadmin, luxadmin is the same as ladmin so i thought it would be easy to just change some stuff to get it working. In some thread i found this.
pawn Код:
#if !defined isnull
    #define isnull(%1) \
                ((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1]))))
#endif
pawn Код:
dcmd_changename(playerid, params[])
{
        if(PlayerInfo[playerid][LoggedIn] == 1) {
        if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /changename [new Name]");
        if(strlen(params) < 4) return SendClientMessage(playerid,red,"ACCOUNT: Incorrect password length");
        if (udb_Exists(params)) return SendClientMessage(playerid,red,"This User Name Is Taken!");
        new nameee[24];  GetPlayerName(playerid, nameee, 16);
        new OldName[24],str[128];
        GetPlayerName(playerid,OldName,sizeof(OldName));
        format(str,sizeof(str),"LuxAdmin/Users/%s.sav",OldName);
        udb_RenameUser(OldName,params);
        format(str,sizeof(str),"LuxAdmin/Users/%s.sav",params);
        SetPlayerName(playerid,params);
        PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
        new string[128];
        format(string, sizeof(string),"ACCOUNT: You have successfully changed your Name to \"%s\"",params);
        return SendClientMessage(playerid,yellow,string);
    } else return SendClientMessage(playerid,red, "ERROR: You must have an account to use this command");
}
I put it in script but when i compile pawno just crash so i dont know where is the problem. i changed AccInfo to PlayerInfo like in ladmin and color defines And paths too.
Can someone can help me with that?
+rep
Reply
#2

show us the error please
Reply
#3

Cant show, with that code pawno just crash when compile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)