Raised This Month: $ Target: $400
 0% 

[TFC] Creating detpack entity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HLM
Senior Member
Join Date: Apr 2008
Location: C:\WINDOWS\System32
Old 09-27-2009 , 03:47   [TFC] Creating detpack entity
Reply With Quote #1

I am running a server with the medicmod plugin by hlstriker, in tfc there are walls and other things that can be 'destroyed' with detpacks to open new pathways, with medicmod, you cannot set detpacks as detpacks are for a certain class only, anyways I am trying to make a simple plugin that will create an entity when a user says in chat "!detpack" without the quotes..

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <engine>

#define PLUGIN "Detpacker"
#define VERSION "1.0"
#define AUTHOR "Master"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say !detpack","set_detpack",-1,"Sets a detpack where you are standing")

}

public 
set_detpack(id)
{
    new 
entid create_entity("detpack")
    new 
Float:origin[3]
    
    
get_user_origin(idorigin0)
    
entity_set_model(entid"models/detpack.mdl")
    
entity_set_origin(entidFloat:origin)
    
entity_set_int(entidEV_INT_solid1)
    
// what am I missing?
    
client_print(id,print_chat,"[AMXX] Laying detpack at ^"%d^"",origin)
    return 
PLUGIN_HANDLED
}

public 
plugin_precache()
{
    
precache_model("models/detpack.mdl")
    
//since this is used by demoman, you would expect it to be precached
    // but its better to be safe than sorry :x

it apparently makes a detpack, but I guess it doesnt 'exist' because whe I try setting a detpack it says I cant stack detpacks..
__________________
+|- KARMA Respectively


Last edited by HLM; 09-27-2009 at 03:51.
HLM is offline
Reply



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


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