Raised This Month: $ Target: $400
 0% 

Problem with godding doors


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wonsae
Senior Member
Join Date: Jan 2006
Location: Behind you >:D
Old 06-26-2006 , 10:52   Problem with godding doors
Reply With Quote #1

Code:
public plugin_init()     {     register_plugin( "GodDoors", "vl", "Wonsae" )     set_task(1.0,"doorhealth")     } public doorhealth(){     new classname[56], door     entity_get_string(door,EV_SZ_classname,classname,55)     door = equali(classname,"func_door") && equali(classname,"func_door_rotating")     if(equali(classname,"func_door") && equali(classname,"func_door_rotating")){         entity_set_float(door,EV_FL_max_health,2000.0)         entity_set_float(door,EV_FL_health,2000.0)         entity_set_float(door,EV_FL_dmg,0.0)         entity_set_float(door,EV_FL_takedamage,0.0)     }     return PLUGIN_HANDLED }

This code doesn't seem to work :\. This is also for TS. the doors keep breaking
wonsae is offline
Des12
Senior Member
Join Date: Jan 2005
Old 06-26-2006 , 12:22   Re: Problem with godding doors
Reply With Quote #2

You have some problems...

First:

door = equali(classname,"func_door") && equali(classname,"func_door_rotating")

is going to make door 0, because classname = null/0 right now. Example:

equali(classname,"func_door") is going to be 0
equali(classname,"func_door_rotating") is going to be 0

door = 0 && 0 is going to be 0

So you have two problems: One, take out this line
door = equali(classname,"func_door") && equali(classname,"func_door_rotating")

Two, assign door to be an entity so the classname is not null

Type /ent and get the entid, then add the maxplayers to that in your plugin
__________________
-Dest Romano

www.JustRP.com
A TSRP Server

Quote:
Originally Posted by Brad
Don't you go be bringing reality into this.
Des12 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 07:56.


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