AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   TSRP item (https://forums.alliedmods.net/showthread.php?t=29845)

tetsoma 06-13-2006 22:37

TSRP item
 
i want a item that allows you to open any door in the server
why for the cops warrents

wonsae 06-14-2006 09:52

I already made you this

tetsoma 06-14-2006 14:49

so if i want it to open any door just put item_doorkey <id> "0" insteed of the door name

awpticaL 06-14-2006 14:55

Quote:

Originally Posted by tetsoma
so if i want it to open any door just put item_doorkey <id> "0" insteed of the door name

Is this true? I'd like to know myself.

Des12 06-14-2006 15:15

You need the code first in order for that to work.

wonsae 06-14-2006 16:42

The code itself opens anydoors.

tetsoma 06-14-2006 17:48

sweet so then item_doorkey <id> and thats it

Lord_Destros 06-14-2006 21:52

Lol, lucky tetsoma

Smokey485 06-19-2006 12:59

If you do amx_doorkey <id> "0" that wouldn't work, if you would really like, here

Code:
// add this to plugin_init() server_cmd("item_doorkey","item_doorkey") // add this to the code public item_doorkey() {    new arg[32];    read_argv(id,arg,31)    new id = str_to_num(arg)    new door, hitbox, maxplayers = get_maxplayers()    get_user_aiming(id,door,hitbox,9999) // get the aiming    if(door > get_maxplayers())    {        //entity_get_string(iIndex, iKey, szReturn[], iRetLen);        new classname[32]        entity_get_string(door,EV_SZ_classname,classname,31)        if(equali(classname,"func_door") || equali(classname,"func_door_rotating" || equali(classname,"func_button"))        {            force_use(id,door)            fake_touch(door,id)            client_print(id,print_chat,"[DOOR] You have opened/closed the door!")        }    } }
and to use this, just make an item and have its cmd be item_doorkey <id>

wonsae 06-19-2006 13:24

I already made him one


All times are GMT -4. The time now is 08:09.

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