Raised This Month: $ Target: $400
 0% 

Requested Plugin...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
D o o m
Veteran Member
Join Date: Sep 2005
Location: Germany
Old 11-30-2005 , 16:52   Requested Plugin...
Reply With Quote #1

Hi everyone
I never made a plugin (only for superhero mod) and someone requested something and now I'm trying to make a hero to a plugin...

I already asked the author of the hero, if he may could make it to a plugin, but I didn't got an answer...

So I tried it by myself and it doesn't works...
Hope you can help me

The plugin should people push away, if you hit them. The best would be, if there is already a plugin like that.

Cause in my plugin are 2 lines which occur an error and maybe that's the problem... No error while compiling, but a debugmessage which spams the whole console...

The 2 lines (line 57 & line 58 in the sma file):
Code:
   entity_get_string(ptd, EV_SZ_classname, ptdname, 31) 
   entity_get_string(ptr, EV_SZ_classname, ptrname, 31)
The debug message:
Code:
L 11/28/2005 - 20:56:20: [ENGINE] Invalid player 0 (not in-game)
L 11/28/2005 - 20:56:20: [AMXX] Displaying debug trace (plugin "pushaway.amxx")
L 11/28/2005 - 20:56:20: [AMXX] Run time error 10: native error (native "entity_get_string")
L 11/28/2005 - 20:56:20: [AMXX]    [0] pushaway.sma::pfn_touch (line 57)
L 11/28/2005 - 20:56:20: [ENGINE] Invalid player 0 (not in-game)
L 11/28/2005 - 20:56:20: [AMXX] Displaying debug trace (plugin "pushaway.amxx")
L 11/28/2005 - 20:56:20: [AMXX] Run time error 10: native error (native "entity_get_string")
L 11/28/2005 - 20:56:20: [AMXX]    [0] pushaway.sma::pfn_touch (line 58)
I read it, but I don't know how can I fix it, because I don't know much about the amxx coding...
Attached Files
File Type: sma Get Plugin or Get Source (pushaway.sma - 626 views - 3.7 KB)
__________________
Heroes
:+: Deadpool :+:
D o o m is offline
Jordan
Veteran Member
Join Date: Aug 2005
Old 11-30-2005 , 18:35  
Reply With Quote #2

Ignore.
Jordan is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 11-30-2005 , 18:40  
Reply With Quote #3

No.. Try this:
Code:
public pfn_touch(ptr, ptd) {    if(ptr > 0 && ptd > 0)    {       if(!is_valid_ent(ptr) || !is_valid_ent(ptd)) return;       new ptrname[32], ptdname[32],ptrUname[32],ptdUname[32]       entity_get_string(ptd, EV_SZ_classname, ptdname, 31)       entity_get_string(ptr, EV_SZ_classname, ptrname, 31)       if(equal(ptrname, "player") && equal(ptdname, "player"))       {          if (g_PushAway[ptr])          {             g_DidPush[ptd]=ptr             g_PushTime[ptd]=20             new Float:Vel[3]             VelocityByAim(ptr, 320, Vel)             Vel[2] = 0.0 // Don't want user to go airbourne               entity_set_vector(ptd, EV_VEC_velocity, Vel)             get_user_name(g_DidPush[ptd],ptrUname,32)             get_user_name(ptd,ptdUname,32)          }       }    } }
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Jordan
Veteran Member
Join Date: Aug 2005
Old 11-30-2005 , 19:33  
Reply With Quote #4

Yeah just ignore what I said I was in a rush and didn't reach your plugin carefully enough... but even if I did I couldn't do what v3x did so yeah.
Jordan is offline
D o o m
Veteran Member
Join Date: Sep 2005
Location: Germany
Old 11-30-2005 , 20:15  
Reply With Quote #5

Thanks v3x

There aren'T any debugmessages now

But the plugin doesn't seem to work...
__________________
Heroes
:+: Deadpool :+:
D o o m is offline
Reply



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:22.


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