Szerző Téma: /hits parancsban 1-2 gond  (Megtekintve 593 alkalommal)

Nem elérhető instant

  • 2778
  • ZzzzzZ
    • Profil megtekintése
/hits parancsban 1-2 gond
« Dátum: 2012. Július 29. - 22:56:02 »
0 Show voters
Üdv , 1 problémám akadt a /hits parancsban méghozzá ha be írom hogy /hits teli floodolja a hülyeségekkel de nem azt írja amit én.
Kép:
\"width=500http://kepfeltoltes.hu/120729/575312065sa-mp-009_www.kepfeltoltes.hu_.png[/img]
Kód:
 
CMD:hits(playerid,params[])
{
        new str[128],
                x,
                i = -1;
       
        SendClientMessage(playerid,-1,\"Vérdijak:\");
       for(new z=0;z<MAX_PLAYERS;z++)
        {
                format(str,sizeof(str),\"%s%s(%d): $%d\",str,pName(i),i,hit);
         
                x++;
                if(x > 3)
                {
                        SendClientMessage(playerid,-1,str);
                        x = 0;
                        format(str, sizeof(str), \"\");
                } else {
                        format(str, sizeof(str), \"%s, \", str);
                }
        }
        if(x <= 3 && x > 0)
        {
                str[strlen(str)-2] = \'.\';
                SendClientMessage(playerid, COLOR_YELLOW, str);
        }
        return 1;
}

/hits parancsban 1-2 gond
« Válasz #1 Dátum: 2012. Július 30. - 01:57:54 »
0 Show voters
nem floodolt, csak kiírta mind a 499 helyre, hogy nincs vérdíj... valahova írtad, hogy mennyi a maximálisan megadható célpont?

Nem elérhető instant

  • 2778
  • ZzzzzZ
    • Profil megtekintése
/hits parancsban 1-2 gond
« Válasz #2 Dátum: 2012. Július 30. - 06:53:32 »
0 Show voters
Idézetet írta: bencarter007 date=1343606274\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"25179\" data-ipsquote-contentclass=\"forums_Topic
nem floodolt, csak kiírta mind a 499 helyre, hogy nincs vérdíj... valahova írtad, hogy mennyi a maximálisan megadható célpont?
 
nem de szerintem a cikluson belül van a gond

/hits parancsban 1-2 gond
« Válasz #3 Dátum: 2012. Július 30. - 08:32:30 »
+1 Show voters
Miért ismerõs ez nekem egy hiv. forumos hits parancsból? o.O nem értem.


ismered te a függvényeket, változókat, illetve hogy mit csinálnak? mert nem úgy tûnik.. >.>
tessék, kicsit leegyszerûsítve, pár én dialoggal csináltam volna.. átláthatóbb
 
CMD:hits(playerid,params[]) {
new str[128],
x;
SendClientMessage(playerid, -1, \"Vérdijak:\");
      for(new i = 0; i < MAX_PLAYERS; i++) {
          if(!IsPlayerConnected(i)) continue;
          if(hit == 0) continue;
   
format(str, sizeof(str), \"%s(%d): $%d\", pName(i), i, hit);
SendClientMessage(playerid, -1, str);
x++;
    }
if(x > 0) format(str, sizeof(str), \"%d levadászható ember van a szerveren\", x);
else if(x == 0) format(str, sizeof(str), \"Nincs pénzért levadászható ember a szerveren\");
SendClientMessage(playerid, COLOR_YELLOW, str);
    return 1;
}

Nem elérhető instant

  • 2778
  • ZzzzzZ
    • Profil megtekintése
/hits parancsban 1-2 gond
« Válasz #4 Dátum: 2012. Július 30. - 09:11:52 »
0 Show voters
Müködik köszi

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal