AlliedModders

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

point.blank 11-10-2007 03:04

Gun Help
 
I need a code that says to give the user a p228 with 1 bullet, all i have so far is

Code:

{
 give_item(id, "weapon_p228");
}

i know it's not much.. but bear with me

[ --<-@ ] Black Rose 11-10-2007 11:36

Re: Gun Help
 
And WHEN will this user be given a p228?

Alka 11-10-2007 11:52

Re: Gun Help
 
You must use "cs_set_weapon_ammo(...)" , http://www.amxmodx.org/funcwiki.php?...ammo&go=search

point.blank 11-10-2007 12:44

Re: Gun Help
 
Quote:

Originally Posted by [ --<-@ ] Black Rose (Post 551434)
And WHEN will this user be given a p228?

when a person says /gun but once every 5 minutes

edit:
i have
Code:

{
 new weapon_id = find_ent_by_owner(1, "weapon_p228", id);
 if(weapon_id)
  {
  cs_set_weapon_ammo(weapon_id, 1);
  }
 give_item(id, "weapon_p228");
}

it gives a gun but with 1/52, leaving the rest of thje clip


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

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