AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [HOW] Help (https://forums.alliedmods.net/showthread.php?t=120509)

reinert 03-05-2010 13:57

[HOW] Help
 
hi everyone, i got VIP Menu like

KNIFE MODE
STEALTH MODE
INVISIBLE MODE

and i want to make that when VIP Player chooses mode from menu, the mode will be applied only for him not all VIP's. so that every VIP Player can have different modes.

wrecked_ 03-05-2010 15:27

Re: [HOW] Help
 
We can't help you if you don't give us code to alter.

reinert 03-05-2010 15:32

Re: [HOW] Help
 
PHP Code:

 new zalosmatymas[33], awprezimas[33], papildomibonusai[33]; 

PHP Code:

 public menu_handler(idmenuitem)
 {
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }

    new 
data[6], iName[64];
    new 
accesscallback;

    
menu_item_getinfo(menuitemaccessdata,5iName63callback);

    new 
key str_to_num(data);
type of string you want)

    switch(
key)
    {
        case 
1:
        {
      
zalosmatymas[id] = 1;
      
papildomibonusai[id] = 0;
      
awprezimas[id] = 0;
          
client_print(idprint_chat"Zalos matymas aktivuotas");
          
menu_destroy(menu);
          return 
PLUGIN_HANDLED;
        }
        case 
2:
        {
         
zalosmatymas[id] = 0;
         
papildomibonusai[id] = 1;
         
awprezimas[id] = 0;
             
client_print(idprint_chat"Papildomi bonusai aktivuoti");
             
menu_destroy(menu);
             return 
PLUGIN_HANDLED;
        }
        case 
3:
        {
         
zalosmatymas[id] = 0;
         
papildomibonusai[id] = 0;
         
awprezimas[id] = 1;
             
client_print(idprint_chat"AWP Rezimas aktivuotas");
         
menu_destroy(menu);
             return 
PLUGIN_HANDLED;
        }
    }

    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;
 } 

Part of code :]

wrecked_ 03-05-2010 15:42

Re: [HOW] Help
 
That sets a few player specific bools, it has nothing to do with the rest of the VIP's.

reinert 03-05-2010 15:46

Re: [HOW] Help
 
so i guess this code is good ? to set different bool's to different people.

that one VIP Player can have

zalosmatymas[id] = 1;

and other player can have

papildomibonusai[id] = 1;

?

wrecked_ 03-05-2010 15:47

Re: [HOW] Help
 
Yep.


All times are GMT -4. The time now is 08:43.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.