changename ladmin4v2 - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: changename ladmin4v2 (
/showthread.php?tid=372248)
changename ladmin4v2 -
bleedis - 25.08.2012
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
Re : changename ladmin4v2 -
BigBaws - 25.08.2012
show us the error please
Re: Re : changename ladmin4v2 -
bleedis - 25.08.2012
Cant show, with that code pawno just crash when compile