09.11.2015, 00:57
How To Prevent Players From Using Symbols?
Ex Name: ™Canga™ or {INA}Canga
This Is My Changename Script
Ex Name: ™Canga™ or {INA}Canga
This Is My Changename Script
PHP код:
if(dialogid == DIALOG_CHANGENAME)
{
if(!response)
{
SendClientMessage(playerid,-1,"You have to cancel to change nickname");
}
else
{
if(PlayerInfo[playerid][LoggedIn] == 1)
{
if(udb_Exists(inputtext)) return ShowPlayerDialog(playerid,DIALOG_CHANGENAME, DIALOG_STYLE_INPUT, "Changename", "{FFFFFF}This {FF0000}Name {FFFFFF}is Taken..!", "Change", "Cancel");
if(strlen(inputtext) > 12) return ShowPlayerDialog(playerid,DIALOG_CHANGENAME, DIALOG_STYLE_INPUT, "Changename", "{FF0000}Incorrect New Name Lenght..!\n{FFFFFF}Max Lenght is {00FF00}12 Characters", "Change", "Cancel");
if(GetPlayerMoney(playerid) < 10000000) return ShowDescriptionTextError(playerid, "~r~ERROR: ~w~Kamu Tidak Punya Cukup ~r~Uang Untuk ~y~Mengganti Nama");
GivePlayerMoney(playerid, -10000000);
new nameee[24]; GetPlayerName(playerid, nameee, 16);
new OldName[24],str[128],strings[512];
GetPlayerName(playerid,OldName,sizeof(OldName));
format(str,sizeof(str),"ladmin/users/%s.sav",udb_encode(OldName));
udb_RenameUser(OldName,inputtext);
format(str,sizeof(str),"ladmin/users/%s.sav",udb_decode(params));
SetPlayerName(playerid,inputtext);
format(strings, sizeof(strings),"{4CC417} .'XSG:FR'. {FFFF00}\"%s\" {FFFFFF}successfully change to {FF0000}\"%s\".",OldName,inputtext);
SendClientMessageToAll(-1,strings);
afixcars(playerid);
afixhs(playerid);
afixbizs(playerid);
format(strings, sizeof(strings),"{FFFFFF}[CHANGENAME] {FFFF00}you have successfully change to \"%s\"",inputtext);
SendClientMessage(playerid,-1,strings);
SetTimerEx("AntiSA", 2000, false, "i", playerid);
return 1;
}
else return SendClientMessage(playerid,-1,"Error : You Must Login.");
}
return 1;
}