27.01.2011, 12:26
(
Последний раз редактировалось Janek17; 27.01.2011 в 12:56.
)
pawn Код:
C:\Documents and Settings\Janek\Desktop\[SK8] Fun Server\gamemodes\SK8.pwn(343) : warning 204: symbol is assigned a value that is never used: "string"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Warning.
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if (dialogid == 1)
{
new name[MAX_PLAYER_NAME], file[256], string[128];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), SERVER_USER_FILE, name);
if(!response) return Kick(playerid);
if (!strlen(inputtext)) return
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "[SK8] Fun Server", "Tere, et mдngida sa pead registreeruma meie serveris", "Registreeri", "Lahku");
dini_Create(file);
dini_IntSet(file, "Parool", udb_hash(inputtext));
dini_IntSet(file, "Admin Level",PlayerInfo[playerid][pAdminLevel] = 0);
dini_IntSet(file, "Raha",PlayerInfo[playerid][pCash] = 500);
dini_IntSet(file, "Scoor",PlayerInfo[playerid][pScore] = 0);
format(string, 128, "[SK8]: Registreerumine хnnestus Nimi:[%s] Parool:[%s], ning sind on automaatselt sisse logitud.", name, inputtext);
SendClientMessage(playerid, COLOR_YELLOW, string);
gPlayerLogged[playerid] = 1;
}
if (dialogid == 2)
{
new name[MAX_PLAYER_NAME], file[256], string[128];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), SERVER_USER_FILE, name);
if(!response) return Kick(playerid);
if (!strlen(inputtext)) return ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "[SK8] Fun Server", "Tere, palun kirjuta oma parool, et mдngu minna", "Logi", "Lahku");
new tmp;
tmp = dini_Int(file, "Parool");
if(udb_hash(inputtext) != tmp) {
SendClientMessage(playerid, COLOR_RED, "Vale parool oli kahjuks, proovi uuesti.");
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "[SK8] Fun Server", "Tere, plaun sisesta oma parool, et mдngu minna", "Logi", "Lahku");
}
else
{
gPlayerLogged[playerid] = 1;
PlayerInfo[playerid][pAdminLevel] = dini_Int(file, "Admin Level");
SetPlayerScore(playerid, PlayerInfo[playerid][pScore]);
GivePlayerMoney(playerid, dini_Int(file, "Raha")-GetPlayerMoney(playerid));
SendClientMessage(playerid,COLOR_RED, "[SK8]: Sisselogimine хnnestus!");
}
}
return 1;
}