AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Open door entity renamed (https://forums.alliedmods.net/showthread.php?t=282638)

skz 05-12-2016 15:36

Open door entity renamed
 
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

Jhob94 05-12-2016 16:21

Re: Open door entity renamed
 
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.

skz 05-12-2016 16:29

Re: Open door entity renamed
 
Quote:

Originally Posted by Jhob94 (Post 2418650)
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!

Zynda 05-15-2016 06:12

Re: Open door entity renamed
 
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 )




All times are GMT -4. The time now is 18:41.

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