Raised This Month: $ Target: $400
 0% 

little help with create block


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
risontek22
Member
Join Date: Mar 2013
Location: localhost
Old 07-23-2013 , 12:30   little help with create block
Reply With Quote #1

PHP Code:
#include <amxmodx>
#include <engine>

new const block_model[] = "models/block.mdl";

public 
plugin_init() 
{
    
register_clcmd("/vytvor","block_create");
}

public 
plugin_precache()
{
    
precache_model(block_model);
}

public 
block_create(id)
{
    new 
Origin[3]
    new 
Float:Origin_Float[3]
    
get_user_origin(id,Origin,3)
    
    
Origin_Float[0] = str_to_float(Origin[0])
    
Origin_Float[1] = str_to_float(Origin[1])
    
Origin_Float[2] = str_to_float(Origin[2])
    
    new 
ent create_entity("info_target"

    
entity_set_string(ent,EV_SZ_classname,"block"); 
    
entity_set_int(ent,EV_INT_movetypeMOVETYPE_NONE); 
    
entity_set_int(ent,EV_INT_solidSOLID_BBOX); 
    
entity_set_model(ent,block_model);
    
entity_set_size(ent,Float:{-100.0,-100.0,-100.0},Float:{100.0,100.0,100.0})
    
entity_set_int(entEV_INT_body3)
    
entity_set_origin(ent,Float:Origin_Float);
    
client_print(id,print_chat,"Entity vytvorena!")

I write /vytvor and it doest create a block pls help ;(

Last edited by risontek22; 07-23-2013 at 12:30.
risontek22 is offline
UchihaSkills
Senior Member
Join Date: May 2013
Location: Germany
Old 07-23-2013 , 13:02   Re: little help with create block
Reply With Quote #2

Debug plugin and make sure plugin is running
UchihaSkills is offline
Reply


Thread Tools
Display Modes

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 06:24.


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