AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Weapon Give Help (https://forums.alliedmods.net/showthread.php?t=49362)

soccdoodcss 01-02-2007 14:16

Weapon Give Help
 
1 Attachment(s)
Code:

public PressedGunMenu1(id, key)
{
    switch(key)
    {
        case 0:
            give_item(id,"weapon_glock18")
       
        case 1:
            give_item(id,"weapon_usp")
       
        case 2:
            give_item(id,"weapon_p228")
       
        case 3:
            give_item(id,"weapon_deagle")
       
        case 4:
            give_item(id,"weapon_fiveseven")
       
        case 5:
            give_item(id,"weapon_elite")
    }
   
}

Isnt working, dunno why. Can anyone help?

The whole source code is attached.

Thanks!

allenwr 01-02-2007 16:59

Re: Weapon Give Help
 
This is what i found in one of my older plugins... im not completely sure, but you can try this:
PHP Code:

switch(key) {
          case 
0: {
                    
give_item(id,"weapon_glock18")
          }



soccdoodcss 01-02-2007 17:21

Re: Weapon Give Help
 
Whats the difference? Ill try it, thanks.

Hey, it actually works, thanks a lot.:up:


All times are GMT -4. The time now is 22:25.

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