Raised This Month: $ Target: $400
 0% 

Scoutz Knivez [Updated 01/16/10] v1.9


Post New Thread Reply   
 
Thread Tools Display Modes
lazarev
Veteran Member
Join Date: Sep 2008
Old 12-14-2009 , 00:40   Re: Zombiezzz| Scoutz Knivez Class/Shop mod
Reply With Quote #21

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); 
    new 
money cs_get_user_money(id
    switch(
key
    { 
        case 
1
        { 
            if(
money>=1000
            { 
                
cs_set_user_money(idmoney 1000); 
                 
                if( 
is_user_aliveid ) )  
                    
cs_set_user_armor(id100CS_ARMOR_VESTHELM)  
                 
                
client_print(idprint_chat"[Scoutz Knviez] You bought 100 armor for $1000"); 
            } 
             
        } 
        case 
2
        { 
            if(
money>=2000)
       {
           
cs_set_user_money(idmoney 2000);
                    
                if( 
is_user_aliveid ) )  
                    
set_user_gravity(id0.3)
                
           
client_print(idprint_chat"[Scoutz Knviez] You bought low gravity for $2000"); 
       }
         
        }
        case 
3:
        {
            if(
money>=5000
       {
           
cs_set_user_money(idmoney 5000);
                    
                if( 
is_user_aliveid ) )  
                  
give_item(id"weapon_flashbang")
                  
give_item(id"weapon_smokegrenade")
                  
give_item(id"weapon_hegrenade")
                
           
client_print(idprint_chat"[Scoutz Knviez] You bought Grenade Pack for $5000"); 
          }
         } 
    case 
4:
    {
        if(
money>=6000)
        {
             
cs_set_user_money(idmoney -6000);
            
        if( 
is_user_aliveid ) )
        
set_user_health(id225)
        
          
client_print(idprint_chat"[Scoutz Knviez] You bought a more HP for $6000"); 
          }
         }
    }
    
menu_destroy(menu); 
    return 
PLUGIN_HANDLED

lazarev is offline
sytremelaker
Senior Member
Join Date: Jun 2006
Location: Staples Center, Los Ange
Old 12-14-2009 , 03:03   Re: Zombiezzz| Scoutz Knivez Class/Shop mod
Reply With Quote #22

Might want to compensate for the fact that scoutzknivez type maps can only be properly played in roughly a quarter of normal gravity (either 200 or 250, forgot the proper setting).

Although you do have a cvar that controls server gravity, seeing as set_user_gravity sets 1.0 to 800 gravity, setting it to 0.2 would set the player's gravity to 20% of 800, which barely decrease the player's gravity in a proper scoutzknivez server and setting it to 0.4 or 0.5 would actually raise the player's gravity.

Might want to add something like this:
Code:
new gravity = get_user_gravity(id);
In the public Class_Handle() and have the classes that are supposed to lower gravity look something more like this:
Code:
set_user_gravity(id, gravity*x)
With (x) being the percentage you actually want to lower the gravity. Also, it may be in your interest to change the percentages you have currently listed as 20 percent of the preset 1/4th gravity might be seen more as a disadvantage than an advantage,
__________________
@ PC Shop Gaming
LetShannonDunk.com - 2010 All-Star Dunk Contest hopeful!

Last edited by sytremelaker; 12-14-2009 at 03:11.
sytremelaker is offline
Send a message via AIM to sytremelaker
Zombiezzz
Veteran Member
Join Date: Nov 2009
Location: Nov 2009
Old 12-14-2009 , 20:16   Re: Zombiezzz| Scoutz Knivez Class/Shop mod
Reply With Quote #23

TY again Lazarez

sytremelaker- i tried doing what you said and it wont read new gravity = get_user_gravity(id);
says id is unknown.
__________________
Zombiezzz is offline
laziboi72
Senior Member
Join Date: Aug 2009
Location: deathrun_temple
Old 12-14-2009 , 21:01   Re: Zombiezzz| Scoutz Knivez Class/Shop mod
Reply With Quote #24

very fun
+k
__________________
Taking a break from modding dunno when i will be back

FAIL, RIGHT HERE
laziboi72 is offline
Zombiezzz
Veteran Member
Join Date: Nov 2009
Location: Nov 2009
Old 12-14-2009 , 21:05   Re: Zombiezzz| Scoutz Knivez Class/Shop mod
Reply With Quote #25

idk what else to add to my shop, anyone got any ideazz!? :S
__________________
Zombiezzz is offline
sytremelaker
Senior Member
Join Date: Jun 2006
Location: Staples Center, Los Ange
Old 12-15-2009 , 05:22   Re: Zombiezzz| Scoutz Knivez Class/Shop mod
Reply With Quote #26

Give me a little while, I'll get back to you,
__________________
@ PC Shop Gaming
LetShannonDunk.com - 2010 All-Star Dunk Contest hopeful!
sytremelaker is offline
Send a message via AIM to sytremelaker
Zombiezzz
Veteran Member
Join Date: Nov 2009
Location: Nov 2009
Old 12-15-2009 , 10:18   Re: Zombiezzz| Scoutz Knivez Class/Shop mod
Reply With Quote #27

Quote:
Originally Posted by sytremelaker View Post
Give me a little while, I'll get back to you,
ok... :g rrr:???? idk ok bye
__________________
Zombiezzz is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 12-15-2009 , 14:22   Re: Zombiezzz| Scoutz Knivez Class/Shop mod
Reply With Quote #28

- [Scoutz Knviez] [Scoutz Knivez]
- Remove is_user_alive check in CheckSpeed( )
- Generate menus in plugin_init, and then just show it, no need to generate it always.

Code:
public menu_handler( const id, const iMenu, const iItem ) {     if( iItem == MENU_EXIT || !is_user_alive( id ) )         return;         new szKey[ 4 ], iKey, iMoney = cs_get_user_money( id );     menu_item_getinfo( iMenu, iItem, iKey, szKey, 3, _, _, iKey );     iKey = str_to_num( szKey );         switch( iKey ) {         case 1: {             if( iMoney >= 1000 ) {                 cs_set_user_money( id, iMoney - 1000 );                 cs_set_user_armor( id, 100, CS_ARMOR_VESTHELM );                                 client_print( id, print_chat, "[Scoutz Knivez] You bought armor for $1000." );             } else {                 client_print( id, print_chat, "[Scoutz Knivez] You don't have enough money to buy this." );             }         }         case 2: {             if( iMoney >= 2000 ) {                 cs_set_user_money( id, iMoney - 2000 );                 set_user_gravity( id, 0.3 );                                 client_print( id, print_chat, "[Scoutz Knivez] You bought low gravity for $2000." );             } else {                 client_print( id, print_chat, "[Scoutz Knivez] You don't have enough money to buy this." );             }         }         case 3: {             if( iMoney >= 5000 ) {                 cs_set_user_money( id, iMoney - 5000 );                 give_item( id, "weapon_flashbang" );                 give_item( id, "weapon_hegrenade" );                 give_item( id, "weapon_smokegrenade" );                                 client_print( id, print_chat, "[Scoutz Knivez] You bought grenades for $5000." );             } else {                 client_print( id, print_chat, "[Scoutz Knivez] You don't have enough money to buy this." );             }         }         case 4: {             if( iMoney >= 6000 ) {                 cs_set_user_money( id, iMoney - 6000 );                 set_user_health( id, 225 );                                 client_print( id, print_chat, "[Scoutz Knivez] You bought more HP for $6000." );             } else {                 client_print( id, print_chat, "[Scoutz Knivez] You don't have enough money to buy this." );             }         }     } }
__________________
xPaw is offline
Zombiezzz
Veteran Member
Join Date: Nov 2009
Location: Nov 2009
Old 12-15-2009 , 18:16   Re: Zombiezzz| Scoutz Knivez Class/Shop mod
Reply With Quote #29

ty for tips Xpaw <3
__________________
Zombiezzz is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 12-16-2009 , 12:54   Re: Zombiezzz| Scoutz Knivez Class/Shop mod
Reply With Quote #30

PHP Code:
#define MAXCLASSES 6

#define CLASS_NOTHING 0
#define CLASS_SCOUT_BIG 1
#define CLASS_SCOUT_SPEED 2
#define CLASS_SCOUT_GRAVITY 3
#define CLASS_SCOUT_GRENADE 4
#define CLASS_SCOUT_ELITE 5 
-->

PHP Code:
enum
{
    
CLASS_NOTHING 0,
    
CLASS_SCOUT_BIG,
    
CLASS_SCOUT_SPEED,
    
CLASS_SCOUT_GRAVITY,
    
CLASS_SCOUT_GRENADE,
    
CLASS_SCOUT_ELITE,
    
MAXCLASSES

__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:42.


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