• Help with derma in net functions.
    6 replies, posted
EDIT: Fixed original problem, but now I have a new problem. So, I'm trying to use ENT:PhysicsCollide(data, phys) to make it so that on collision with another entity, the collided entity will dissapear and will raise a nwint by one, but it isn't working. Here's a little bit of my serverside code. I have verified that the nwint is one when the metal collides. [CODE]function ENT:PhysicsCollide(data, phys) if ( ( data.HitEntity:GetClass() == "wp_metal" ) and ( self:GetNWInt("stockstatus") == 1 ))then self:SetNWInt ( "stock", math.Clamp (self:GetNWInt ( "stock" ) + 1, 1, self:GetNWInt("maxstock") )) data.HitEntity:Remove() end if (( data.HitEntity:GetClass() == "wp_metal" ) and ( self:GetNWInt("bodystatus") == 1 ))then self:SetNWInt ( "body", math.Clamp (self:GetNWInt ( "body" ) + 1, 1, self:GetNWInt("maxbody") )) data.HitEntity:Remove() end if ( ( data.HitEntity:GetClass() == "wp_metal" ) and ( self:GetNWInt("barrelstatus") == 1 ))then self:SetNWInt ( "barrel", math.Clamp (self:GetNWInt ( "barrel" ) + 1, 1, self:GetNWInt("maxbarrel") )) data.HitEntity:Remove() end end [/CODE]
Bump!
Bump! again pls someone...
any errors?
[QUOTE=XxLMM13xXx;50372179]any errors?[/QUOTE] There are no errors when the server starts up, when a client joins, or when I collide the metal.
You did not mention anywhere what the problem is.
[QUOTE=Zeh Matt;50374335]You did not mention anywhere what the problem is.[/QUOTE] I did please read the first post again.
Sorry, you need to Log In to post a reply to this thread.