AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   catch player touch the entity model number (https://forums.alliedmods.net/showthread.php?t=109752)

One 11-21-2009 06:48

catch player touch the entity model number
 
hey,

i want to catch the model id & my plugin gives me other id as what i can see in bspviewer.. know anyone why its so ?

PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fakemeta>
#include <fakemeta_stocks>

public plugin_init() 
{
    
register_plugin("haha","huhu""haha")
    
register_touch("trigger_hurt","player","Forward_PlayerTouchRedirect")
}
public 
Forward_PlayerTouchRedirect(id,entmodel[])
{
    new 
test[32];
    
EF_ModelIndex(test)
    
client_print(0,print_chat,"%s",sModel,class,class,test)


model id showed in bsp viewer = *1
plugin outpuu = 214

Xellath 11-21-2009 06:55

Re: catch player touch the entity model number
 
Code:
#include < amxmodx > #include < engine > public plugin_init( ) {     register_touch( "trigger_hurt", "player", "Forward_TriggerTouch" ); } public Forward_TriggerTouch( iEntity, iClient ) {     static szModel[ 32 ];     entity_get_string( iEntity, EV_SZ_model, szModel, 31 );         if( is_user_alive( iClient ) )     {         client_print( iClient, print_chat, "%s", szModel );     } }

One 11-21-2009 07:01

Re: catch player touch the entity model number
 
ty


All times are GMT -4. The time now is 13:39.

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