Raised This Month: $ Target: $400
 0% 

Make button to door


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Nican
Veteran Member
Join Date: Jan 2006
Location: NY
Old 02-11-2007 , 17:11   Make button to door
Reply With Quote #1

Well, i usually do not like to ask for help, but i am getting desperate

I am trying to make a plugin so a person can make a button to a door... I already tried a variety of things, and most of the times, the server crashes

How this works, this is a menu...
Key 1 = Look at door
Key 2 = Look at button
Key 3 = Finish
hisaim = get_use_aiming(id,hisaim...)
PHP Code:
switch(key){
            case 
0: {
                new 
theclassname[32]
                
entity_get_string(hisaim,EV_SZ_classname,theclassname,32)
                if(
hisaim == extrastuffb[id])
                    
client_print(id,print_chat,"[Nican] A object can not be a door and a button at the same time!")
                else if(!
equal(theclassname,"func_door",9))
                    
client_print(id,print_chat,"[Nican] This item is not a valid door")                
                else
                    
extrastuff[id] = hisaim
            
}
            case 
1: {
                if(
hisaim == extrastuff[id])
                    
client_print(id,print_chat,"[Nican] A object can not be a door and a button at the same time!")
                else 
                
extrastuffb[id] = hisaim
            
}
            case 
2:{
                if(
extrastuff[id] == || extrastuffb[id] == 0){
                    
client_print(id,print_chat,"[Nican] Please do steps 1 and 2 first")
                } else {
                new 
randomnum random_num(1,512)
                
                new 
clas[32]
                
entity_get_string(extrastuffb[id],EV_SZ_classname,clas,32)
                
                if(!
equal(clas,"func_rot_button"))
                    
set_kvd(extrastuffb[id], KV_ClassName"func_rot_button")
                
set_pev(extrastuff[id],pev_targetname,randomnum)
                
set_pev(extrastuffb[id],pev_target,randomnum)                
                }        
            }            
        } 
Thank you
__________________
http://www.nican132.com
I require reputation!
Nican is offline
Send a message via ICQ to Nican Send a message via MSN to Nican
 



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 00:36.


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