Szerző Téma: Report Dialogosan  (Megtekintve 1161 alkalommal)

Report Dialogosan
« Dátum: 2015. Április 12. - 11:52:56 »
0 Show voters
Helló! ezt hogy oldjam meg hogy dialogba lehessen kérdezni?
 
CMD:report(playerid, params[])
{
   
new panasz[128], str[256];
if(reportletilt[playerid] > 0) return Malibu(playerid,  \"Le vagy tiltva reportolásról!\");
if(sscanf(params, \"s[128]\", panasz)) return  Malibu(playerid, \"Használat: /report [panasz, kérdés]\");
format(rep[playerid], 128, panasz);
format(str, 256, \"%s[%i] panasza: %s\", pName(playerid), playerid, rep[playerid]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
     for(new i; i<MAX_PLAYERS; i++)
{
    if(IsPlayerConnected(i))
    {
   if(pInfo > 0 || as > 0)
   {
      if(reportki == 0) SendClientMessage(i, COLOR_YELLOW, str);
   }
}
}
return 1;
}
« Utoljára szerkesztve: 2015. Április 12. - 13:18:11 írta RusH. »

Nem elérhető M1A1

Report Dialogosan
« Válasz #1 Dátum: 2015. Április 12. - 11:58:59 »
0 Show voters
Először értsd meg a dialogokat. Ne várd, hogy mecsináljuk helyetted.
http://sampforum.hu/index.php?topic=11685.0
http://sampforum.hu/index.php?topic=9258.0
« Utoljára szerkesztve: 2015. Április 12. - 12:01:30 írta M1A1 »

Nem elérhető ZSOLTI99

  • 1827
    • Profil megtekintése
Report Dialogosan
« Válasz #2 Dátum: 2015. Április 12. - 12:02:11 »
0 Show voters
Hozz létre egy dialogot és ott ezt kell alkalmaznod
 DIALOG_STYLE_INPUT 

 
 wiki.sa-mp.com/wiki/OnDialogResponse
« Utoljára szerkesztve: 2015. Április 12. - 12:06:37 írta ZSOLTI99 »

Report Dialogosan
« Válasz #3 Dátum: 2015. Április 12. - 12:51:41 »
+2 Show voters
#define DIALOG_REP 3333
CMD:report(playerid, params[])
{
        if(reportletilt[playerid] > 0) return Malibu(playerid,  \"Le vagy tiltva reportolásról!\");
        ShowPlayerDialog(playerid,DIALOG_REP,DIALOG_STYLE_INPUT,\"Report\",\"írd be a problémád\",\"OK\",\"Mégse\");
        return 1;
}

 
Dialog
 

If(dialogid == DIALOG_REP)
{
If(strlen(inputtext) <1)
{
SendClientMessage(playerid,-1,\"valami nem stimmel\");
return 1;
}
new str[256];
format(rep[playerid], 128, inputtext);
        format(str, 256, \"%s[%i] panasza: %s\", pName(playerid), playerid, rep[playerid]);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
        for(new i; i<MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                        if(pInfo > 0 || as > 0)
                        {
                                if(reportki == 0) SendClientMessage(i, COLOR_YELLOW, str);
                        }
                }
        }
return 1;
}

 
Bocsi tabról vagyok...


úgy látom hogy a segítőkész rangot sikerült ki érdemeled ZSOLTI99

Report Dialogosan
« Válasz #4 Dátum: 2015. Április 12. - 14:16:57 »
0 Show voters
Tesztelem addig is megy a + :)

Dupla hozzászólás automatikusan összefûzve. ( 2015. Április 12. - 14:25:37 )

Van 1 eror
C:\\Users\\home\\Desktop\\real\\gamee\\asd.pwn(28547) : error 033: array must be indexed (variable \"pInfo\")
nem tudom mit jelent
« Utoljára szerkesztve: 2015. Április 12. - 14:25:37 írta xXCsucsuXx »

Report Dialogosan
« Válasz #5 Dátum: 2015. Április 12. - 16:48:19 »
0 Show voters
Ugye ezzel van  a baj?
 
if(pInfo > 0 || as > 0)

 
általában ez úgy néz ki hogy pInfo[pAdmin]

A te módodban nem tudom hogy van..

Report Dialogosan
« Válasz #6 Dátum: 2015. Április 12. - 16:53:45 »
0 Show voters
igen avval

Dupla hozzászólás automatikusan összefûzve. ( [time]2015. Április 12. 16:54:38[/time] )

egyébként így  if(pInfo[playerid] < 1)

Dupla hozzászólás automatikusan összefûzve. ( 2015. Április 12. - 16:56:41 )

 if(pInfo[playerid] < 1) igy csak nem engedi ki irni
« Utoljára szerkesztve: 2015. Április 12. - 16:56:41 írta xXCsucsuXx »

Report Dialogosan
« Válasz #7 Dátum: 2015. Április 12. - 16:57:21 »
0 Show voters
pInfo [ i ] [pAdmin]
Nem??
Mi az admin valtozoja?

Report Dialogosan
« Válasz #8 Dátum: 2015. Április 12. - 16:58:59 »
0 Show voters
if(pInfo[playerid]-admin- > 0) igy a kotojel helyen 1 ilyen van [

Dupla hozzászólás automatikusan összefûzve. ( [time]2015. Április 12. 17:04:31[/time] )

if(pInfo[playerid] > 0 || as > 0)
                        {
                                if(reportki == 0) SendClientMessage(i, COLOR_YELLOW, str);
                        }

 
az as ist irjam át?
« Utoljára szerkesztve: 2015. Április 12. - 17:11:13 írta anGeL »

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal