Raised This Month: $51 Target: $400
 12% 

Need some help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bilal Pro
Senior Member
Join Date: Mar 2012
Location: Holland
Old 07-30-2012 , 15:02   Need some help
Reply With Quote #1

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <colorchat>
#include <hamsandwich>
#include <cstrike>
#include <engine>
#include <fun>

#define PLUGIN "Scoutzknivez"
#define VERSION "1.0"
#define AUTHOR "Bilal"

new Prefix[] = "[AoD]"

new g_maxplayers

new boolHasgame1
new boolHasgame2
new boolHasgame3
new boolHasgame4
new boolHasgame5

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_logevent("Cmdroundstart"2"1=Round_Start")
    
register_logevent("Cmdroundend"2"1=Round_End")
    
    
RegisterHam(Ham_Spawn"player""Cmdspawn"1)
    
RegisterHam(Ham_Weapon_SecondaryAttack"weapon_scout""Cmdnoscope")
    
    
g_maxplayers get_maxplayers()
}

public 
Cmdspawn(id)
{
    if (
Hasgame1)
    {
        
strip_user_weapons(id)
        
        
set_task(0.5"Cmdheadshot"id)
        
        
set_user_hitzones(id02)
    }
    else if (
Hasgame2)
    {
        
strip_user_weapons(id)
        
        
set_task(0.5"Cmdnoscopeday"id)
    }
    else if (
Hasgame3)
    {
        
strip_user_weapons(id)
        
        
set_task(0.5"Cmdknife"id)
    }
    else if (
Hasgame4)
    {
        
strip_user_weapons(id)
        
        
set_task(0.5"Cmdnormal"id)
    }
    else if (
Hasgame5)
    {
        
strip_user_weapons(id)
        
        
set_task(0.5"Cmdnormal"id)
    }
    
Hasgame1 false
    Hasgame2 
false
    Hasgame3 
false
    Hasgame4 
false
    Hasgame5 
false
}

public 
Cmdroundstart()
{
    new 
Roll random_num(15)
    
    for (new 
1<=g_maxplayersi++)
    {
        switch (
Roll)
        {
            case 
1:
            {
                
Hasgame1 true
                
                strip_user_weapons
(i)
                
                
set_task(0.5"Cmdheadshot"i)
                
                
set_user_hitzones(i02)
                
                
ColorChat(iGREY"%s ^1The round: ^4Headshot only!"Prefix)
            }
            case 
2:
            {
                
Hasgame2 true
                
                strip_user_weapons
(i)
                
                
set_task(0.5"Cmdnoscopeday"i)
                
                
ColorChat(iGREY"%s ^1The round: ^4Noscope only!"Prefix)
            }
            case 
3:
            {
                
Hasgame3 true
                
                strip_user_weapons
(i)
                
                
set_task(0.5"Cmdknife"i)
                
                
ColorChat(iGREY"%s ^1The round: ^4Knife only!"Prefix)
            }
            case 
4:
            {
                
Hasgame4 true
                
                strip_user_weapons
(i)
                
                
set_task(0.5"Cmdnormal"i)
                
                
ColorChat(iGREY"%s ^1The round: ^4Normal!"Prefix)
            }
            case 
5:
            {
                
Hasgame5 true
                
                strip_user_weapons
(i)
                
                
set_lights("c")
                
                
set_task(0.5"Cmdnormal"i)
                
                
ColorChat(iGREY"%s ^1The round: ^4Night n seeK!"Prefix)
            }
        }
    }
}

public 
Cmdroundend()
{
    
set_lights("m")
}

public 
Cmdheadshot(id)
{
    
strip_user_weapons(id)
    
    
give_item(id"weapon_scout")
    
cs_set_user_bpammo(idCSW_SCOUT30)
}

public 
Cmdnoscopeday(id)
{
    
strip_user_weapons(id)
    
    
give_item(id"weapon_scout")
    
cs_set_user_bpammo(idCSW_SCOUT30)
}

public 
Cmdknife(id)
{
    
strip_user_weapons(id)
    
    
give_item(id"weapon_knife")
}

public 
Cmdnormal(id)
{
    
strip_user_weapons(id)
    
    
give_item(id"weapon_knife")
    
give_item(id"weapon_scout")
}

public 
Cmdnoscope(const entity)
{
    return 
Hasgame2 HAM_SUPERCEDE HAM_IGNORED

It doesnt strip the guns / give the guns to the people? why not. What is the problem?
__________________
  • Point System with rank titles for sale [X] [100% private]
  • VIP Menu for sale [X] [100% private]
  • HnS shop more features for sale [X] [100% private]
Contact: Bilalzaandam1234, on steam if you are interested.
Bilal Pro is offline
EpicMonkey
buttmonkey
Join Date: Feb 2012
Old 07-30-2012 , 15:35   Re: Need some help
Reply With Quote #2

Most prob cause user has no game
EpicMonkey is offline
Bilal Pro
Senior Member
Join Date: Mar 2012
Location: Holland
Old 07-30-2012 , 15:40   Re: Need some help
Reply With Quote #3

Quote:
Originally Posted by EpicMonkey View Post
Most prob cause user has no game
What does that mean ?:O
__________________
  • Point System with rank titles for sale [X] [100% private]
  • VIP Menu for sale [X] [100% private]
  • HnS shop more features for sale [X] [100% private]
Contact: Bilalzaandam1234, on steam if you are interested.
Bilal Pro is offline
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 07-30-2012 , 15:43   Re: Need some help
Reply With Quote #4

Well , it can send an error in console saying Index of bounds or out of range and that's the reason that dont work , see if server logs send something.
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 07-30-2012 , 15:46   Re: Need some help
Reply With Quote #5

check is_user_alive
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz 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 09:29.


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