Raised This Month: $ Target: $400
 0% 

curweapon help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Samurai [/]
Member
Join Date: Sep 2006
Old 04-18-2007 , 08:29   Re: curweapon help
Reply With Quote #9

Quote:
Originally Posted by scrtxxcaz View Post
Code:
public plugin_int() {
          register_plugin(PLUGIN, VERSION, AUTHOR)
          register_event("CurWeapon","current_weapon")
}
public current_weapon(id){
          new team = get_user_team(id,team,31)
          new ammo,clip,weapon
         get_user_weapon(weapon,ammo,clip)
          if(weapon == CSW_GLOCK18)
          {
                    // write your do something here
          }
          if(weapon == CSW_USP)
         {
                      //write your do something here
          }
          if(weapon == CSW_KNIFE && team == 1) //terroist
         {
                     // write your do something here
          }
}
i even color coordinated it for you, so dont say i didnt do anything for you.. lol
This is my code:
PHP Code:
public current_weapon(id)

new 
team get_user_team(id,team,31)
new 
ammo,clip,weapon
get_user_weapon
(weapon,ammo,clip)
if(
weapon == CSW_GLOCK1)
{
strip_user_weapons(id)
give_item("weapon_flashbang")
give_item("weapon_flashbang")
give_item("weapon_smokegrenade")
}
if(
weapon == CSW_USP)
{
strip_user_weapons(id)
give_item("weapon_knife")
}
if(
weapon == CSW_KNIFE && team == 1//terroist
{
strip_user_weapons(id)
give_item("weapon_flashbang")
give_item("weapon_flashbang")
give_item("weapon_smokegrenade")
}
if(
weapon == CSW_C4)
{
strip_user_weapons(id)
}

whit errors:
Code:
/home/groups/amxmodx/tmp3/textIuXvLo.sma(613) : error 035: argument type mismatch (argument 2)
/home/groups/amxmodx/tmp3/textIuXvLo.sma(619) : error 035: argument type mismatch (argument 1)
/home/groups/amxmodx/tmp3/textIuXvLo.sma(620) : error 035: argument type mismatch (argument 1)
/home/groups/amxmodx/tmp3/textIuXvLo.sma(621) : error 035: argument type mismatch (argument 1)
/home/groups/amxmodx/tmp3/textIuXvLo.sma(626) : error 035: argument type mismatch (argument 1)
/home/groups/amxmodx/tmp3/textIuXvLo.sma(631) : error 035: argument type mismatch (argument 1)
/home/groups/amxmodx/tmp3/textIuXvLo.sma(632) : error 035: argument type mismatch (argument 1)
/home/groups/amxmodx/tmp3/textIuXvLo.sma(633) : error 035: argument type mismatch (argument 1)
__________________
Samurai [/] is offline
 



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 06:37.


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