18.10.2012, 14:10
Above is for Y_ini
there goes for Dini
More examples will help you more..
there goes for Dini
Code:
CMD: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!"); if(GetPlayerMoney(playerid) < 50000) return SendClientMessage(playerid, red,"[ERROR]: You need $50000 to change your name!"); new nameee[24]; GetPlayerName(playerid, nameee, 16); new OldName[24],str[128]; GetPlayerName(playerid,OldName,sizeof(OldName)); format(str,sizeof(str),"ladmin/users/%s.sav",OldName); udb_RenameUser(OldName,params); format(str,sizeof(str),"ladmin/users/%s.sav",params); SetPlayerName(playerid,params); PlayerPlaySound(playerid,1057,0.0,0.0,0.0); GivePlayerMoney(playerid, -50000); 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"); }