hlmod.hu
https://hlmod.hu/

Menü steam id -re
https://hlmod.hu/viewtopic.php?f=9&t=4398
Oldal: 1 / 1

Szerző:  fear_ezmegmi [2012.05.13. 23:26 ]
Hozzászólás témája:  Menü steam id -re

Azt szeretném kérdezni ,hogy hogyan lehet megoldani ,hogy steam id -re ( több -re ) lehessen egy menüt elérhetővé tenni?

Szerző:  Metal [2012.05.14. 11:43 ]
Hozzászólás témája:  Re: Menü steam id -re

SteamIDt lekéred, s ha megegyezik a listádban tároltak valamelyikével, akkor nyissa meg a menüt.

Szerző:  Silent [2012.05.14. 15:20 ]
Hozzászólás témája:  Re: Menü steam id -re

Kód:
new const steamidk[][34] =
{
    
"STEAM_ID...",
    
"STEAM_ID2..."
}

public function(
index)
{
    for(new 
i=1i<sizeof(steamidk); i++)
    {
        new 
authid[34];
        
get_user_authid(indexauthid33);
        if(
equal(steamidk[i], authid)
        {
             
menufunction(id);
             return 
1;
          }
      }
}
 

Szerző:  Metal [2012.05.15. 13:42 ]
Hozzászólás témája:  Re: Menü steam id -re

Inkább így :)

Kód:
  1. new const steamidk[][34] =

  2. {

  3.     "STEAM_ID...",

  4.     "STEAM_ID2..."

  5. }

  6.  

  7. public function(index)

  8. {

  9.     new authid[34];

  10.     get_user_authid(index, authid, 33);

  11.  

  12.     new bool:l=false;

  13.     new i=1;

  14.     while (i<sizeof(steamidk) && !l)

  15.     {

  16.         if(equal(steamidk[i], authid)

  17.         {

  18.             menufunction(index);

  19.             l=true;

  20.         }

  21.         else

  22.             i++;

  23.     }

  24. }


Silent írta:
Kód:

new const steamidk
[][34] =
{
    "STEAM_ID...",
    "STEAM_ID2..."
}

public function(index)
{
    for(new i=1; i<sizeof(steamidk); i++)
    {
        new authid[34];
        get_user_authid(index, authid, 33);
        if(equal(steamidk[i], authid)
        {
             menufunction(id);
             return 1;
          }
      }
}
 

Szerző:  fear_ezmegmi [2012.05.15. 14:52 ]
Hozzászólás témája:  Re: Menü steam id -re

Már nem kell ,de azért köszönöm a válaszokat :)

Oldal: 1 / 1 Minden időpont UTC+02:00 időzóna szerinti
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/