[POMOĆ]/report

Započeo TiXoR_, Novembar 16, 2010, 18:18:57 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Ja san napravio report u dialogu i sada kada stisnem 'izaÄ'i' izbaci me iz servera.
if(strcmp(cmd, "/report", true) == 0)
{
   if(IsPlayerConnected(playerid))
   {
           ShowPlayerDialog(playerid,14,DIALOG_STYLE_INPUT,"REPORT"," Å ta želite prijavit adminima?","Prijavi","IzaÄ'i");
   }
   return 1;
}

A OnDialogResponse:
if(response)
{
if(dialogid == 14)
{
       new str[160];
   GetPlayerName(playerid, str, MAX_PLAYER_NAME);
           for (new i = 0; i < MAX_PLAYER_NAME; i++)
           if (str[i] == '_')
           str[i] = ' ';
format(str, sizeof(str), "[ID:%d] Prijava od %s: %s",playerid, str, (inputtext));
ABroadCast(COLOR_ORANGE,str,1);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Vasa prijava je poslana Adminima.");
}
}   
Poslednja Izmena: Novembar 16, 2010, 18:19:32 POSLE PODNE od RedMan

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new sendername[MAX_PLAYER_NAME];
new string[128];
if(!response)
{ }
{
if(dialogid == 14)
{
        new str[160];
    GetPlayerName(playerid, str, MAX_PLAYER_NAME);
            for (new i = 0; i < MAX_PLAYER_NAME; i++)
            if (str[i] == '_')
            str[i] = ' ';
format(str, sizeof(str), "[ID:%d] Prijava od %s: %s",playerid, str, (inputtext));
ABroadCast(COLOR_ORANGE,str,1);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Vasa prijava je poslana Adminima.");
}
}
if(response)
{
if(dialogid == 12346 || dialogid == 12347)
{
    if(strlen(inputtext))
    {
new tmppass[64];
strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
OnPlayerLogin(playerid,tmppass);
}
else
{
new loginstring[128];
new loginname[64];
GetPlayerName(playerid,loginname,sizeof(loginname));
format(loginstring,sizeof(loginstring),"KRIVA ŠIFRA\nUpiši točnu šifru:",loginname);
ShowPlayerDialog(playerid,12347,DIALOG_STYLE_INPUT,"Login",loginstring,"Login","IzaÄ'i");
gPlayerLogTries[playerid] += 1;
if(gPlayerLogTries[playerid] == 5) { Ban(playerid); }
}
}
if(dialogid == 12345)
{
    if(strlen(inputtext))
    {
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s.ini", sendername);
new File: hFile = fopen(string, io_read);
if (hFile)
{
SendClientMessage(playerid, COLOR_ORANGE, "Taj NICK je već zauzet.");
fclose(hFile);
return 1;
}
new tmppass[64];
strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
OnPlayerRegister(playerid,tmppass);
}
else
{
new regstring[128];
new regname[64];
GetPlayerName(playerid,regname,sizeof(regname));
format(regstring,sizeof(regstring),"Dobrodošao, %s\nNemaš Accout.\nRegistriraj se:",regname);
ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"Register",regstring,"Register","IzaÄ'i");
}
}
}
else
{
Kick(playerid);
}
return 1;
}

Eto dodao sam,ali opet ne radi
Pogledaj ti to. :P

Citat: Hoxxy poslato Novembar 17, 2010, 16:37:52 POSLE PODNE
Izbrisi na kraju koda ovo:

else  
   {  
      Kick(playerid);  
   }  


I izbrisi ono sto sam ti ja rekao da ubacis ;)
Kada u logiranju stisnem izaÅ¡i ne kicka me.   ::)
EDIT: Napravio sam. ;)
Poslednja Izmena: Novembar 17, 2010, 22:23:43 POSLE PODNE od RedMan