Raised This Month: $ Target: $400
 0% 

Help With Makeing Plugins


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
onfirenburnin420
Senior Member
Join Date: Jan 2005
Old 01-18-2005 , 16:38   here is the code THIS IS ALL CREDITED TO DIZZY!
Reply With Quote #9

#include <amxmodx>
#include <fun>

new bool:hasloaned[32]

public plugin_init() {
register_plugin("WeaponGiver","1.0","Dizzy")
register_cvar("sv_nade","1")
register_clcmd("say /smoke","Smoke")
register_clcmd("say /he","HE")
register_clcmd("say /flash","Flash")
register_clcmd("say /Scout","Scout")
register_event("ResetHUD","roundchange","b")
}

public client_connect(id) {
hasloaned[id] = false
}
public client_disconnect(id) {
hasloaned[id] = false
}

public Smoke(id) {
if (hasloaned[id])
return PLUGIN_HANDLED
if (get_cvar_num("sv_nade") !=0) {
give_item(id,"weapon_smokegrenade")
}
return PLUGIN_HANDLED
}

public HE(id) {
if (hasloaned[id])
return PLUGIN_HANDLED
if (get_cvar_num("sv_nade") !=0) {
give_item(id,"weapon_hegrenade")
}
return PLUGIN_HANDLED
}

public Flash(id) {
if (hasloaned[id])
return PLUGIN_HANDLED
if (get_cvar_num("sv_nade") !=0) {
give_item(id,"weapon_flashbang")
}
return PLUGIN_HANDLED
}

public Scout(id) {
if (hasloaned[id])
return PLUGIN_HANDLED
if (get_cvar_num("sv_nade") !=0) {
give_item(id,"weapon_Scout")
}
return PLUGIN_HANDLED
}

public roundchange(id)
{
hasloaned[id] = false
return PLUGIN_CONTINUE
}
__________________
onfirenburnin420 is offline
Send a message via AIM to onfirenburnin420
 



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 19:29.


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