06.10.2012, 11:51
(
Последний раз редактировалось [SF]OutLawZ; 07.10.2012 в 07:23.
)
Hello,
I just recently changed my command Processor to zcmd and i've come across to the point where my /register command seems to be bugging up.
It doesn't call the lines
And then doesn't give the usage
Any clue?
edit solved
I just recently changed my command Processor to zcmd and i've come across to the point where my /register command seems to be bugging up.
It doesn't call the lines
Код:
else if (!params[0]){ ShowPlayerDialog(playerid,17,DIALOG_STYLE_INPUT,"Register","Enter your password","Register","Cancel"); }
Код:
else if (strlen(params) < MINPWLENGTH) SendClientMessage(playerid, COLOUR_WARNING, "Your password must be at least " #MINPWLENGTH " characters long");
Код:
COMMAND:register(playerid, params[]) { if (g_playerdata[playerid][SIGNEDIN]) SendClientMessage(playerid, COLOUR_DEFAULT, "You are already registered and logged in"); else if (g_playerdata[playerid][KICKING]) SendClientMessage(playerid, COLOUR_WARNING, "You are already registered, please /login"); else if (INI_Exist(ReturnPlayerFilename(g_playerdata[playerid][NAME]))) SendClientMessage(playerid, COLOUR_WARNING, "An Account exist under this name"); else if (!params[0]){ ShowPlayerDialog(playerid,17,DIALOG_STYLE_INPUT,"Register","Enter your password","Register","Cancel"); } else if (strlen(params) < MINPWLENGTH) SendClientMessage(playerid, COLOUR_WARNING, "Your password must be at least " #MINPWLENGTH " characters long"); else if (INI_Open(ReturnPlayerFilename(g_playerdata[playerid][NAME]))) { INI_WriteString("PasswordHash", MD5_Hash(params)); INI_WriteString("LastIP", ReturnPlayerIP(playerid)); INI_WriteString("KILLMSG", "~r~Wasted_"); INI_WriteInt("InGang",-1); INI_WriteInt("GANG",-1); INI_WriteInt("Bank",10000); // weapon shit INI_WriteInt("DeagleAmmo",5000); INI_WriteInt("SilencedAmmo",5000); INI_WriteInt("CountryAmmo",2000); INI_WriteInt("M4Ammo",6000); INI_WriteInt("AK47Ammo",6000); INI_WriteInt("CombatAmmo",6000); INI_WriteInt("ShotgunAmmo",6000); INI_WriteInt("MP5Ammo",6000); INI_WriteInt("SniperAmmo",6000); INI_WriteInt("GrenadeAmmo",10); INI_WriteInt("MolotovAmmo",5); INI_WriteInt("SatchelAmmo",30); INI_WriteInt("KnifeAmmo",1); INI_WriteInt("BatAmmo",1); INI_WriteInt("DildoAmmo",1); INI_WriteInt("UziAmmo",6000); INI_WriteInt("TecAmmo",6000); INI_WriteInt("ColtAmmo",6000); INI_WriteInt("SawnAmmo",6000); INI_WriteInt("ChainsawAmmo",1); // Skills INI_WriteInt("DeagleSkill",9999); INI_WriteInt("SilencedSkill",9999); INI_WriteInt("M4Skill",9999); INI_WriteInt("AK47Skill",9999); INI_WriteInt("CombatSkill",9999); INI_WriteInt("ShotgunSkill",9999); INI_WriteInt("MP5Skill",9999); INI_WriteInt("SniperSkill",9999); INI_WriteInt("UziSkill",9999); INI_WriteInt("ColtSkill",9999); INI_WriteInt("SawnSkill",9999); INI_WriteInt("ReactionWon",0); INI_WriteInt("MathsWon",0); INI_Save(); INI_Close(); g_playerdata[playerid][SIGNEDIN] = 1; g_playerdata[playerid][GANG] = -1; g_playerdata[playerid][BANK] = 10000; //g_playerdata[playerid][KILLMSG] = "~r~Wasted"; strmid(g_playerdata[playerid][KILLMSG],"~r~Wasted_",0,31,128); new string[MAX_STRING]; format(string, sizeof(string), "Account successfully created! Your password is \"%s\" and you have been signed in, welcome to Gamer_Z Australia", params); SendClientMessage(playerid, COLOUR_DEFAULT, string); SendTBMessageToPlayer(playerid, "~p~~h~Thx so much for registering!"); SendTBMessageToPlayer(playerid,"~r~$10000 ~w~has been deposited in your account"); format(string,sizeof(string),"Player %s has registered his account.",g_playerdata[playerid][NAME]); AddAdminLogLine(COLOUR_INFO,string); } else SendClientMessage(playerid, COLOUR_WARNING, "Account creation failed"); return 1; }
edit solved