08.07.2013, 17:27
Bro.. This is my code
pawn Код:
//==============================================================================
Dialog:Rulesc(playerid, response, listitem, inputtext[])
{
return 1;
}
Dialog:Helpc(playerid, response, listitem, inputtext[])
{
return 1;
}
Dialog:Adminc(playerid, response, listitem, inputtext[])
{
return 1;
}
Dialog:Vipc(playerid, response, listitem, inputtext[])
{
return 1;
}
Dialog:Login(playerid, response, listitem, inputtext[])
{
if(response)
{
if(strlen(inputtext))
{
new tmp[64];
strmid(tmp, inputtext, 0, strlen(inputtext), 255);
OnPlayerLogin_(playerid,tmp);//
} //
else
{
new loginstring[256];
SendClientMessage(playerid, COLOR_WHITE, "SERVER: You have to entry your password");
format(loginstring,sizeof(loginstring),"{FFFFFF}[Bulgarian] {32cd32}[Red County] {FF0000}[Roleplay]\n{FFFFFF}Pleaes entry your password.");
ShowDialog(playerid, Show:Login,DIALOG_STYLE_PASSWORD,"Login:",loginstring,"Login","Exit"); // this is Bugged
}
}
else
{
Kick(playerid);
}
return 1;
}
Dialog:Register(playerid, response, listitem, inputtext[])
{
if(response)
{
if(strlen(inputtext))
{
new string[ 30 ];
format(string, sizeof(string), "%s.ini", PlayerName(playerid));
if(dini_Exists(string))
{
SendClientMessage(playerid, COLOR_YELLOW, "Това име е заето, сменето го с друго!");
return 1;
}
new tmp[64];
strmid(tmp, inputtext, 0, strlen(inputtext), 255);
OnPlayerRegister(playerid, tmp);
}
else
{
new regstring[256];
format(regstring,sizeof(regstring),"{FFFFFF}[Bulgarian] {32cd32}[Red County] {FF0000}[Roleplay]\n{FFFFFF}Това име не е регистрирано. Въведи парола за да го регистрираш.");
ShowDialog(playerid, Show:Register,DIALOG_STYLE_PASSWORD,"Регистрация:",regstring,"Регистрирай","Излез");
}
}
else
{
Kick(playerid);
}
return 1;
}
Dialog:Events(playerid, response, listitem, inputtext[])
{
if(response)
{
SetPlayerPos(playerid, EvnTp[playerid][0],EvnTp[playerid][1],EvnTp[playerid][2]);
ResetPlayerWeapons(playerid);
SetPlayerColor(playerid, COLOR_EVENT);
ResetPlayerWeaponsEx(playerid);
SetPlayerVirtualWorld(playerid, 1);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
SendClientMessage(playerid,0x00FF00FF, "Ти прие поканата си и оръжията ти бяха премахнати!");
}
else
{
SendClientMessage(playerid,COLOR_GRAD1, "Ти отказа поканата в евента!");
}
return 1;
}
/*public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new string[256];
switch(dialogid)
{
case 12346:
{
if(response)
{
if(strlen(inputtext))
{
new tmp[64];
strmid(tmp, inputtext, 0, strlen(inputtext), 255);
OnPlayerLogin_(playerid,tmp);//
} //
else
{
new loginstring[256];
SendClientMessage(playerid, COLOR_WHITE, "SERVER: You have to entry your password");
format(loginstring,sizeof(loginstring),"{FFFFFF}[Bulgarian] {32cd32}[Red County] {FF0000}[Roleplay]\n{FFFFFF}Pleaes entry your password.");
ShowPlayerDialog(playerid,12347,DIALOG_STYLE_PASSWORD,"Login:",loginstring,"Login","Exit"); // this is Bugged
}
}
else
{
Kick(playerid);
}
}
case 12347:
{
if(response)
{
if(strlen(inputtext))
{
new tmp[64];
strmid(tmp, inputtext, 0, strlen(inputtext), 255);
OnPlayerLogin_(playerid,tmp);//
} //
else
{
new loginstring[256];
SendClientMessage(playerid, COLOR_WHITE, "SERVER: You have to entry your password");
format(loginstring,sizeof(loginstring),"{FFFFFF}[Bulgarian] {32cd32}[Red County] {FF0000}[Roleplay]\n{FFFFFF}Pleaes entry your password.");
ShowPlayerDialog(playerid,12347,DIALOG_STYLE_PASSWORD,"Login:",loginstring,"Login","Exit"); // this is Bugged
}
}
else
{
Kick(playerid);
}
}
case 12345:
{
if(response)
{
if(strlen(inputtext))
{
format(string, sizeof(string), "%s.ini", PlayerName(playerid));
if(dini_Exists(string))
{
SendClientMessage(playerid, COLOR_YELLOW, "Това име е заето, сменето го с друго!");
return 1;
}
new tmp[64];
strmid(tmp, inputtext, 0, strlen(inputtext), 255);
OnPlayerRegister(playerid, tmp);
}
else
{
new regstring[256];
format(regstring,sizeof(regstring),"{FFFFFF}[Bulgarian] {32cd32}[Red County] {FF0000}[Roleplay]\n{FFFFFF}Това име не е регистрирано. Въведи парола за да го регистрираш.");
ShowPlayerDialog(playerid,12345,DIALOG_STYLE_PASSWORD,"Регистрация:",regstring,"Регистрирай","Излез");
}
}
else
{
Kick(playerid);
}
}
case 525:
{
if(response)
{
SetPlayerPos(playerid, EvnTp[playerid][0],EvnTp[playerid][1],EvnTp[playerid][2]);
ResetPlayerWeapons(playerid);
SetPlayerColor(playerid, COLOR_EVENT);
ResetPlayerWeaponsEx(playerid);
SetPlayerVirtualWorld(playerid, 1);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
SendClientMessage(playerid,0x00FF00FF, "Ти прие поканата си и оръжията ти бяха премахнати!");
}
else
{
SendClientMessage(playerid,COLOR_GRAD1, "Ти отказа поканата в евента!");
}
}
case 30://aoc
{
if(response)
{//Main gate/ Water Gate/ Spec Gate/ View Gate/ Locker door / Up door
if(listitem == 0)
{
}
if(listitem == 1)
{
}
if(listitem == 2)
{
}
if(listitem == 3)
{
}
if(listitem == 4)
{
}
if(listitem == 5)
{
}
}
else
{
}
return 1;
}
case 31:
{
if(response)
{//Main gate/ Water Gate/ Spec Gate/ View Gate/ Locker door / Up door
if(listitem == 0)
{
}
if(listitem == 1)
{
}
if(listitem == 2)
{
}
if(listitem == 3)
{
}
if(listitem == 4)
{
}
if(listitem == 5)
{
}
return 1;
}
else
{
}
}
}
return 1;
}*/
//=====