15.03.2011, 07:49
Hello I've Maded This but i want when someone enter wrong pass it kick him i tried alot but i can't do it
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 0)
{
if(!response)
{
} else {
Kick(playerid);
if(!strlen(inputtext))
{
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_INPUT, "Registration", "Welcome To The CALL OF DUTY MODERNWAFARE!\nPlease enter your password below to regiser\n an account.", "Continue", "Quit");
return 1;
}
new name[MAX_PLAYER_NAME], dat[200], ip[40];
GetPlayerName(playerid, name, sizeof(name));
GetPlayerIp(playerid, ip, sizeof(ip));
format(dat, sizeof(dat), "MyData/User/%s.txt", name);
new File:fi = fopen(dat, io_write);
fclose(fi);
new day, year, month, date[10];
getdate(year, month, day);
format(date, sizeof(date), "%d/%d/%d", day, month, year);
dini_Set(dat, "Name", name);
dini_Set(dat, "IP", ip);
dini_Set(dat, "Password", inputtext);
dini_Set(dat, "Registered", date);
dini_IntSet(dat, "Money", 0);
dini_IntSet(dat, "Score", 0);
dini_IntSet(dat, "Level", 0);
SetPlayerScore(playerid, 0);
SetPlayerMoney(playerid, 0);
PlayerData[playerid][Level] = 0;
new string[150];
format(string, sizeof(string), "*%s registered and joined the server!", name);
SendClientMessageToAll(COLOR_GREEN, string);
SetPVarInt(playerid, "Logged", 1);
}
} else if(dialogid == 1)
{
}
return 1;
}