Raised This Month: $ Target: $400
 0% 

Need help spawning crowbar


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
joecaprini
Junior Member
Join Date: Jul 2004
Location: In a blackhole
Old 03-10-2005 , 20:46   Need help spawning crowbar
Reply With Quote #1

I was trying to write a plugin that will spawn a crowbar in front of you but I can't get it to appear it just says unknown command.

Code:
#include <amxmodx> #include <engine> public plugin_init() {     register_plugin("Crowbar","0.1","JoeCaprini")     register_clcmd("amx_crowbar","createcrowbar",ADMIN_BAN,"- Creates a crowbar") } public createcrowbar() {     // Create the crowbar     new entbar = create_entity("info_target")     // Give it a new name     entity_set_string(entbar,EV_SZ_classname,"crowbar")     // Set the model     entity_set_model(entbar,"models/w_crowbar.mdl")     // Position it     new Float:PVEC[3] = {0.0,0.0,0.0}     entity_set_origin(entbar,PVEC)     // Set some properties I don't understand     entity_set_int(entbar, EV_INT_solid, 1)     entity_set_int(entbar, EV_INT_movetype, 6)     return PLUGIN_CONTINUE } // new weaponid, clip, ammo // weaponid = get_user_weapon(id, clip, ammo) // if (weaponid == CSW_C4) // { //      ammo_hud(id, 1) //      entity_set_string(id, EV_SZ_viewmodel, "models/v_crowbar.mdl") //      entity_set_string(id, EV_SZ_weaponmodel, "models/p_crowbar.mdl") // } public plugin_precache() {     precache_model("models/w_crowbar.mdl")     precache_model("models/v_crowbar.mdl")     precache_model("models/p_crowbar.mdl") }
__________________
-JOECAPRINI-
joecaprini is offline
Send a message via AIM to joecaprini
 



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 14:10.


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