Raised This Month: $ Target: $400
 0% 

Using code


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Randomize
BANNED
Join Date: May 2012
Location: in your heart
Old 05-08-2012 , 06:46   Using code
Reply With Quote #1

is this code give bots a weapon, isn't it?

Quote:
/* Plugin generated by AMXX-Studio */

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

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"


public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_concmd("amx_giveweapon", "buyhelmet")
}
new const g_Weapons[33][] = {
"", "p228", "shield", "scout", "hegrenade",
"xm1014","c4", "mac10", "aug", "smokegrenade",
"elite", "fiveseven", "ump45", "sg550", "galil",
"famas", "usp", "glock18", "awp", "mp5",
"m249", "m3", "m4a1", "tmp", "g3sg1",
"flashbang", "deagle", "sg552", "ak47", "knife",
"p90", "kevlar", "assault"
}

new g_MaxBPAmmo[33] = {0,52,0,90,0,32,0,100,90,0,120,100,100,90,90, 90,100,120,30,120,200,21,90,120,90,0,35,90,90 ,0,100,0,0}

public cmd_giveweapon(id) {
if ( ! ( get_user_flags(id) & ADMIN_KICK ) )
return PLUGIN_CONTINUE

new arg1[32], arg2[32]

read_argv(1, arg1, 31)
read_argv(2, arg2, 31)

new target = cmd_target(id, arg1, 0)

if ( ! target )
return PLUGIN_CONTINUE

new weap[40] = "weapon_"

for ( new i = 1; i < 33; i++ ) {

if( equali(arg2, g_Weapons[i]) ) {

copy(weap[7], 32, g_Weapons[i])

give_item(target , weap)

if ( i != 2 && i != 4 && i != 6 && i != 9 && i != 25 && i != 29 && i != 31 && i != 32 )
cs_set_user_bpammo(id, i, g_MaxBPAmmo[i])

return PLUGIN_CONTINUE
}
}

client_print(id, print_console, "Weapon ^"%s^" was not found", arg2)

return PLUGIN_CONTINUE
}
Randomize 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 00:27.


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