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

**>>A.M Auto Fights<<**


Post New Thread Reply   
 
Thread Tools Display Modes
Co0k!E$ HaMStE$
BANNED
Join Date: Aug 2009
Location: Cookies Land, Mars
Old 09-17-2009 , 20:44   Re: [{ AK VS M4 } ]
Reply With Quote #11

i think you did good with your plugin +karma now what you should do next it make a plugin where a player choose a class, he gets the classes gun like this.

SAS: M4, degal, flashbang.

GSG-9: Shotgun. tatical, smoke.

SEAL TEAM6: SMG, (forgot name of pistolz D and greande.

GIGN: AWP, All greandes, degal.

I hope you understand what im saying :] do the same for the T team.
Co0k!E$ HaMStE$ is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 09-17-2009 , 20:50   Re: [{ AK VS M4 } ]
Reply With Quote #12

Yes, maybe a comment like "boring" is not the best... or maybe ppl have to add why is boring... but ye, the true is that this plugin is boring... cuz is not something new... this already has been made it... a lot of times.

And also you can do something like this plugin when you are rly new in scripting... becouse you only need rly basic things... but well...

People have to read this before post a new plugin:

http://forums.alliedmods.net/showthread.php?t=21956
http://forums.alliedmods.net/showthread.php?t=11201

Also:

PHP Code:
public akm4(id)
{    
    if(
is_user_alive(id))
    {
      
        switch(
cs_get_user_team(id))
        {
            case 
CS_TEAM_T:
            {
                
strip_user_weapons(id)
                
cs_set_user_money (id0)
                
give_item(id"weapon_ak47")
                
give_item(id"weapon_glock18")
                
give_item(id"weapon_hegrenade")
                
give_item(id"weapon_flashbang")
                
cs_set_user_bpammo(idCSW_AK4790)
                
cs_set_user_bpammo(idCSW_GLOCK18120)                
            }
            case 
CS_TEAM_CT:
            {
                
strip_user_weapons(id)
                
cs_set_user_money(id0)
                
give_item(id"weapon_m4a1")
                
give_item(id"weapon_usp")
                
give_item(id"weapon_hegrenade")
                
give_item(id"weapon_flashbang")
                
cs_set_user_bpammo(idCSW_M4A190)
                
cs_set_user_bpammo(idCSW_USP100
            }
        }
    }

-->

PHP Code:
public akm4(id)
{
    if(
is_user_alive(id) )
    {
        
strip_user_weapons(id)
        
set_pdata_int(id1160)
        
        switch(
cs_get_user_team(id) )
        {
            case 
CS_TEAM_T:
            {
                
give_item(id"weapon_ak47")
                
give_item(id"weapon_glock18")
                
cs_set_user_bpammo(idCSW_AK4790)
                
cs_set_user_bpammo(idCSW_GLOCK18120)                
            }
            case 
CS_TEAM_CT:
            {
                
give_item(id"weapon_m4a1")
                
give_item(id"weapon_usp")
                
cs_set_user_bpammo(idCSW_M4A190)
                
cs_set_user_bpammo(idCSW_USP100
            }
        }
        
give_item(id"weapon_hegrenade")
        
give_item(id"weapon_flashbang")
        
        
cs_set_user_money (id0)
    }

And at the top, add:

PHP Code:
#include <fakemeta> 
If you don't understand why i added this:

PHP Code:
set_pdata_int(id1160
And the fakemeta module... go to this link:

http://forums.alliedmods.net/showthread.php?t=90106
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
Xevious
Senior Member
Join Date: Sep 2009
Location: Computer Chair
Old 09-17-2009 , 21:00   Re: Co0k!E$ HaMStE$
Reply With Quote #13

hmm, i think if 1 model 1 weapon , if some people don't like the m3 shotgun
then how - .- ?
__________________
Nothing possible when you are not hardworking
Xevious is offline
Send a message via MSN to Xevious
Xevious
Senior Member
Join Date: Sep 2009
Location: Computer Chair
Old 09-17-2009 , 21:02   Re: [{ AK VS M4 } ]
Reply With Quote #14

thank you Alucard^ for your script code.


1.2 version fixed
__________________
Nothing possible when you are not hardworking

Last edited by Xevious; 10-07-2009 at 02:05.
Xevious is offline
Send a message via MSN to Xevious
Co0k!E$ HaMStE$
BANNED
Join Date: Aug 2009
Location: Cookies Land, Mars
Old 09-17-2009 , 21:03   Re: [{ AK VS M4 } ]
Reply With Quote #15

if they don't like the shotgun, they can change classes
Co0k!E$ HaMStE$ is offline
Xevious
Senior Member
Join Date: Sep 2009
Location: Computer Chair
Old 09-17-2009 , 21:07   Re: [{ AK VS M4 } ]
Reply With Quote #16

nice idea but , how to make a menu , i also need to check it out ! HAHA


thank for you brilliant idea.
__________________
Nothing possible when you are not hardworking
Xevious is offline
Send a message via MSN to Xevious
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 09-17-2009 , 21:56   Re: [{ AK VS M4 } ]
Reply With Quote #17

How to make a menu?

http://forums.alliedmods.net/showthread.php?t=46364
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
Xevious
Senior Member
Join Date: Sep 2009
Location: Computer Chair
Old 09-18-2009 , 00:21   Re: [{ AK VS M4 } ]
Reply With Quote #18

.....the menu never show out man . . .

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

#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <cstrike>
#include <fakemeta>
#include <fun>

#define PLUGIN "AKM4"
#define VERSION "1.2"
#define AUTHOR "Xevious"


public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
RegisterHamHam_Spawn"player""akm4");
    
RegisterHamHam_Spawn"weapon""a4menu"1);
}

public 
akm4(id)
{
    if(
is_user_alive(id) )
    {
        
strip_user_weapons(id)
        
set_pdata_int(id1160)
        
        switch(
cs_get_user_team(id) )
        {
            case 
CS_TEAM_T:
            {
                
give_item(id"weapon_ak47")
                
give_item(id"weapon_glock18")
                
cs_set_user_bpammo(idCSW_AK4790)
                
cs_set_user_bpammo(idCSW_GLOCK18120)                
            }
            case 
CS_TEAM_CT:
            {
                
give_item(id"weapon_m4a1")
                
give_item(id"weapon_usp")
                
cs_set_user_bpammo(idCSW_M4A190)
                
cs_set_user_bpammo(idCSW_USP100
            }
        }
        
give_item(id"weapon_hegrenade")
        
give_item(id"weapon_flashbang")
        
        
cs_set_user_money (id0)
    }
}  


public 
a4menu(id)
{
    new 
menu menu_create("\rWeapons Menu""menu_handler");
    
menu_additem(menu"\wAK + USP + HE + FB""1"0);
    
menu_additem(menu"\wM4 + GlOCK18 + HE + FB""2"0);
    
menu_additem(menu"\wAWP + DEAGLE + HE + FB""3"0);
    
menu_setprop(menuMPROP_EXITMEXIT_ALL);
    
menu_display(idmenu0);
}

public 
menu_handler(idmenuitem)
{
    
//we don't want to deal with them if they exited a menu
    
if( item == MENU_EXIT )
    {
        
menu_destroy(menu);
        
give_item(id"weapon_usp")
        
cs_set_user_bpammo(idCSW_USP100)
        return 
PLUGIN_HANDLED;
    }
    
    
//now lets create some variables that will give us information about the menu and the item that was pressed/chosen
    
new data[6], iName[64];
    new 
accesscallback;
    
//heres the function that will give us that information (since it doesnt magicaly appear)
    
menu_item_getinfo(menuitemaccessdata,5iName63callback);
    
    
//Note - that you can do this next step how you want, this is just the way I prefer
    
    //looking back to menu_additem, we sent data with every item we added, this is where it gets a little fishy for us (where you can do your own method)
    
new key str_to_num(data);
    
//note that all my datas were numbers (you can do it with whatever type of string you want)
    
    //now lets find which item was pressed
    
switch(key)
    {
        case 
1:
        {
            
            
give_item(id"weapon_ak47")
            
give_item(id"weapon_glock18")
            
cs_set_user_bpammo(idCSW_AK4790)
            
cs_set_user_bpammo(idCSW_GLOCK18120)
            
give_item(id"weapon_hegrenade")
            
give_item(id"weapon_flashbang")
            
//note that if we dont want to continue through the function, we can't just end with a return. We want to kill the menu first
            
menu_destroy(menu);
            return 
PLUGIN_HANDLED;
        }
        case 
2:
        {
            
give_item(id"weapon_ak47")
            
give_item(id"weapon_glock18")
            
cs_set_user_bpammo(idCSW_AK4730)
            
cs_set_user_bpammo(idCSW_GLOCK1835)
            
give_item(id"weapon_hegrenade")
            
give_item(id"weapon_flashbang")
        }
        case 
3//again i don't have experience with the admin limitations, so i don't know if you need to have a check before this (im assuming you don't though ^_^)
        
{
            
give_item(id"weapon_awp")
            
give_item(id"weapon_deagle")
            
cs_set_user_bpammo(idCSW_AWP30)
            
cs_set_user_bpammo(idCSW_DEAGLE35)
            
give_item(id"weapon_hegrenade")
            
give_item(id"weapon_flashbang")
        }
    }
    
    
//lets finish up this function with a menu_destroy, and a return
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;

__________________
Nothing possible when you are not hardworking
Xevious is offline
Send a message via MSN to Xevious
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 09-18-2009 , 00:58   Re: [{ AK VS M4 } ]
Reply With Quote #19

Quote:
Originally Posted by Xevious View Post
.....the menu never show out man . . .
Replace :

Code:
RegisterHam( Ham_Spawn, "weapon", "a4menu", 1);

with

Code:
RegisterHam( Ham_Spawn, "pizza", "a4menu", 1);
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
GmTx
BANNED
Join Date: May 2009
Location: Mountains [BG/Sofia]
Old 09-18-2009 , 02:17   Re: [{ AK VS M4 } ]
Reply With Quote #20

If you start to make menu disable spawn with weapons only use it for strip_user_weapon and think something new for your plugin
GmTx is offline
Send a message via Skype™ to GmTx
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 00:53.


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