Raised This Month: $32 Target: $400
 8% 

Open door entity renamed


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
skz
Senior Member
Join Date: Jul 2014
Location: Portugal
Old 05-12-2016 , 15:36   Open door entity renamed
Reply With Quote #1

I want to rename a entity of a door to when I write /open it will only open that specific door, I tryed this way:

PHP Code:
set_pev(ent[id], pev_targetname"Jail")
dllfunc(DLLFunc_Use"Jail"); 
ent[id] its because I made the entity that the user is aiming at

But it didnt work... why? The entity is renamed (I already tested) but it doesn't open the door
__________________

Last edited by skz; 05-12-2016 at 16:17.
skz is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Location: Siiiiiiiiuu
Old 05-12-2016 , 16:21   Re: Open door entity renamed
Reply With Quote #2

i guess that you dont have to use the door entity, but the button that the map has to use the entity. After all, you have to use +use on that button to open it. Not sure, but i think that's it.
__________________
Jhob94 is offline
skz
Senior Member
Join Date: Jul 2014
Location: Portugal
Old 05-12-2016 , 16:29   Re: Open door entity renamed
Reply With Quote #3

Quote:
Originally Posted by Jhob94 View Post
i guess that you dont have to use the door entity, but the button that the map has to use the entity. After all, you have to use +use on that button to open it. Not sure, but i think that's it.
It worked!
__________________

Last edited by skz; 05-12-2016 at 23:13.
skz is offline
Zynda
Member
Join Date: Jul 2011
Old 05-15-2016 , 06:12   Re: Open door entity renamed
Reply With Quote #4

Here is another way of doing it. This will force use any entity.This code will force use any entity the player is looking at, but you could simply supply any entity you wish.

PHP Code:
new entitybodypart

// Get which entity is being looked at
get_user_aimingidentitybodypart )

// Check if the entity is valid
if( is_valid_ententity ) )
{
    
// Force use the entity
    
force_useentityid )


Last edited by Zynda; 05-15-2016 at 06:14.
Zynda 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 14:54.


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