11.11.2013, 14:04
Can you please help me make a command /changename?
Here is the sample for changepass maybe you can get something on it. Thanks alot. I really need!
Here is the sample for changepass maybe you can get something on it. Thanks alot. I really need!
Код:
COMMAND:changepass(playerid,params[]) //level0
{
new pass[128];
if(sscanf(params, "s[128]", pass))
{
GameTextForPlayer(playerid, "~g~/changepass ~w~<New password>", 3000, 3);
return 1;
}
if(strlen(pass) < MIN_PASS_LEN || strlen(pass) > MAX_PASS_LEN)
{
GameTextForPlayer(playerid, "~r~Incorrect password length", 3000, 3);
return 1;
}
new string[128];
UpdatePlayerPass(playerid, pass);
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
format(string, sizeof(string),">> You have successfully changed your password to | {FFFFFF}%s",pass);
SendClientMessage(playerid, GREEN,string);
return 1;
}


