14.12.2012, 17:26
Hello, since my registration system got bugged, im trying to make it in a command, here is:
But i get: error 035: argument type mismatch (argument 1)
Starting from:
to
What's wrong with that?
pawn Код:
CMD:register(playerid, params[])
{
if(!params[0]) return SendClientMessage(playerid, COLOR_ORANGE, "USAGE: /register [password]");
new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof name);
new file[128];
format(file, sizeof(file), "/Users/%s.ini", name);
new INI:handler = INI_Open(file);
INI_SetTag(file,"data");
INI_WriteInt(file,"Password",udb_hash(params));
INI_WriteInt(file,"Cash",0);
INI_WriteInt(file,"Admin",0);
INI_WriteInt(file,"Kills",0);
INI_WriteInt(file,"Deaths",0);
INI_WriteInt(file,"NoPm",0);
INI_WriteInt(file,"Mute",0);
INI_WriteInt(file,"Vip",0);
INI_WriteInt(file,"C4",0);
INI_WriteInt(file,"Banned",0);
INI_WriteInt(file,"Cookies",0);
INI_WriteInt(file,"Warn",0);
INI_WriteInt(file, "RegisterDate_day", Day);
INI_WriteInt(file, "RegisterDate_mon", Month);
INI_WriteInt(file, "RegisterDate_year",Year);
INI_WriteInt(file, "RegisterDate_hour",Hour);
INI_WriteInt(file, "RegisterDate_min", Minute);
INI_WriteInt(file, "RegisterDate_sec", Second);
INI_WriteInt(file, "Min", 0);
INI_WriteInt(file, "Hour", 0);
INI_WriteInt(file, "Sec", 0);
INI_WriteInt(file, "Jailed", 0);
INI_WriteInt(file, "Logged", 0);
INI_WriteInt(file, "AdminActions", 0);
INI_WriteInt(file, "Rank", 0);
INI_Close(handler);
new string[128]; format(string, sizeof(string), "You have successfully registered your account with the password \'%s\'. You have been automatically logged in.", params);
return SendClientMessage(playerid, red, string);
}
Starting from:
pawn Код:
INI_SetTag(file,"data");
pawn Код:
INI_WriteInt(file, "Rank", 0);