Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == REGISTER_D)
{
if(!response) return Kick(playerid);
if(response)
{
new INI:Fajl = INI_Open(IgraciPath(playerid));
INI_SetTag(Fajl,"data");
INI_WriteString(Fajl, "Lozinka", inputtext);
INI_WriteInt(Fajl, "Porijeklo", P_Data[playerid][Porijeklo]);
INI_WriteInt(Fajl, "Spol", P_Data[playerid][Spol]);
INI_Close(Fajl);
SPD(playerid, SPOL_D, DSL, "Odaberite spol","Musko\nZensko", "Dalje", "Kick");
}
}
if(dialogid == LOGIN_D)
{
if(!response) return Kick(playerid);
if(response)
{
if(!strcmp(inputtext, P_Data[playerid][Lozinka], false))
{
INI_ParseFile(IgraciPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
SpawnPlayer(playerid);
}
else
{
if(loginpokusaji[playerid] == 0)
{
loginpokusaji[playerid]++;
SPD(playerid, LOGIN_D, DSP,"Login","Unijeli ste pogresnu lozinku, upisite vasu lozinku za da se logujete na server(Imate jos 3 pokusaja)", "Login", "Kick");
}
else if(loginpokusaji[playerid] == 1)
{
loginpokusaji[playerid]++;
SPD(playerid, LOGIN_D, DSP,"Login","Unijeli ste pogresnu lozinku, upisite vasu lozinku za da se logujete na server(Imate jos 2 pokusaja)", "Login", "Kick");
}
else if(loginpokusaji[playerid] == 2)
{
loginpokusaji[playerid]++;
SPD(playerid, LOGIN_D, DSP,"Login","Unijeli ste pogresnu lozinku, upisite vasu lozinku za da se logujete na server(Imate jos 1 pokusaja)", "Login", "Kick");
}
else if(loginpokusaji[playerid] == 3)
{
SCM(playerid, -1, "Unijeli ste lozinku pogresno 3 puta zato ste {FFFF00}Kickovani {FFFFFF}od strane servera.");
Kick(playerid);
}
}
}
}
if(dialogid == SPOL_D)
{
if(!response) Kick(playerid);
if(response)
{
switch(listitem)
{
case 0:
{
P_Data[playerid][Pol] = 0;
SCM(playerid, -1, "Uredu, musko ste.");
SPD(playerid, PORIJEKLO_D, DSL, "Odabir porijekla", "BiH\nSrbija\nHrvatska", "Odaberi", "Kick");
}
case 1:
{
P_Data[playerid][Pol] = 1;
SCM(playerid, -1, "Uredu, zensko ste.");
SPD(playerid, PORIJEKLO_D, DSL, "Odabir porijekla", "BiH\nSrbija\nHrvatska", "Odaberi", "Kick");
}
}
}
}
if(dialogid == PORIJEKLO_D)
{
if(!response) Kick(playerid);
if(response)
{
switch(listitem)
{
case 0:
{
P_Data[playerid][Porijeklo] = 0;
SCM(playerid, -1, "Uredu, iz BiH ste.");
SpawnPlayer(playerid);
}
case 1:
{
P_Data[playerid][Porijeklo] = 1;
SCM(playerid, -1, "Uredu, iz Srbije ste.");
SpawnPlayer(playerid);
}
case 2:
{
P_Data[playerid][Porijeklo] = 2;
SCM(playerid, -1, "Uredu, iz Hrvatske ste.");
SpawnPlayer(playerid);
}
}
}
}
return 1;
}
Those errors are not because of the YSI library. You are using undefined constants:
This will work in most cases ^ but if does not,then find a unique dialog id for it.
.Why?Becausew the script cannot read it, it does not exist so just define it already!The error practically told you what was wrong, I honestly don't see any purpose in helping you since you don't listen..