Raised This Month: $ Target: $400
 0% 

Plugin Not Working on Linux?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 04-07-2007 , 22:48   Plugin Not Working on Linux?
Reply With Quote #1

I have rewritten an old Day of Defeat plugin, Drop Grenades. I posted it up on DOD Plugins.net and some of the linux users are having a bit of difficulty. It seems to run absolutely fine on windows, but something seems to be up with linux.

Quote:
If you drop a nade by pressing drop key it will drop and then u will have unlimited nades that you cant trow.

You cant pick up nades, enemies or teamates or urs.
I don't have any pdata settings in my plugin, so perhaps one of you more experienced guys can find something else that requires a linux offset?

Attached is the sma for the plugin. Thanks for your help guys.
Attached Files
File Type: sma Get Plugin or Get Source (dod_dropgrenades2.sma - 990 views - 12.1 KB)
__________________

Day of Defeat AMXX Community

FakeMeta Research . Voice Proximity . Advanced Deploy . Technician
Wilson [29th ID] is offline
Send a message via ICQ to Wilson [29th ID] Send a message via AIM to Wilson [29th ID] Send a message via MSN to Wilson [29th ID] Send a message via Yahoo to Wilson [29th ID]
anwari
Junior Member
Join Date: Apr 2007
Old 04-11-2007 , 09:09   Re: Plugin Not Working on Linux?
Reply With Quote #2

Some 1 please try to fix this plugin, alot of people need this.
anwari is offline
anwari
Junior Member
Join Date: Apr 2007
Old 04-15-2007 , 01:53   Re: Plugin Not Working on Linux?
Reply With Quote #3

Any 1 please...
anwari is offline
Da_sk8rboy
Veteran Member
Join Date: Jul 2006
Old 04-15-2007 , 03:16   Re: Plugin Not Working on Linux?
Reply With Quote #4

Don't bump.
__________________
i stop around here and there.
Da_sk8rboy is offline
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 04-16-2007 , 14:26   Re: Plugin Not Working on Linux?
Reply With Quote #5

Here.

I added a time delay for touch so they don't pick up the grenade back up again when they drop it. I used pdata native instead of dod_set_user_ammo.

Also added a fix for g_cvarSmoke = get_cvar_pointer(... If the Zor plugin wasn't loaded you would get an runtime error since get_cvar_pointer will return invalid pointer.


I also found out that dod_get/set_user_ammo for DODW_HANDGRENADE and DODW_STICKGRENADE were using offsets that don't really deal with ammo amount. When setting those other offset did nothing to change the grenades that was in dod_get/set_user_ammo for the hand grenade and stick grenade had no affect on adding more or taking away from their grenade ammo.

DODW_HANDGRENADE: 289
DODW_STICKGRENADE: 291

+5 for linux

Only the two values above did something


Also you can instead of hooking think. You can let the engine remove it for you ( I think this should work since the next think of the entity is get_gametime() + x seconds.

Code:
//under set_pev( ent, pev_nextthink, get_stay_time() ); //add set_pev(ent, pev_flags, pev(ent, pev_flags) |= FL_KILLME);

Then the engine will remove it when it time. and remove the Think forward

edit:

One more change... You need to move get_cvar_pointer to plugin_cfg .. You have to do that in there if it a register cvar from another plugin.

Or you will have to set this plugin under the other plugin with that cvar.


LINUX VERSION TESTED ONLY.
Attached Files
File Type: sma Get Plugin or Get Source (dod_dropgrenades2.sma - 1089 views - 13.4 KB)
__________________
No private support via Instant Message
GunGame:SM Released

Last edited by teame06; 04-23-2007 at 15:16.
teame06 is offline
Send a message via AIM to teame06
anwari
Junior Member
Join Date: Apr 2007
Old 04-16-2007 , 18:53   Re: Plugin Not Working on Linux?
Reply With Quote #6

I tried to compile this with amxx 1.76c


temp.sma(434) : error 017: undefined symbol "AMMO_GREN"
temp.sma(434) : error 088: number of arguments does not match definition

2 Errors.
Could not locate output file ../amxx/dod_dropgrenades2.1.76c.amx (compile failed).
anwari is offline
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 04-16-2007 , 19:18   Re: Plugin Not Working on Linux?
Reply With Quote #7

Quote:
Originally Posted by anwari View Post
I tried to compile this with amxx 1.76c


temp.sma(434) : error 017: undefined symbol "AMMO_GREN"
temp.sma(434) : error 088: number of arguments does not match definition

2 Errors.
Could not locate output file ../amxx/dod_dropgrenades2.1.76c.amx (compile failed).

It fixed .. seem like AMMO_* constants are only in 1.8 AMXx in the svn. I added a thing to fix that problem and still be compatible with 1.8 in the future.
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
anwari
Junior Member
Join Date: Apr 2007
Old 04-16-2007 , 22:29   Re: Plugin Not Working on Linux?
Reply With Quote #8

Ok here is the bugs that it currently has...

After that little fix you did it now compiles fine with amxx 1.76c

Only axis drop nades when they die
even doh max amount of nades aloud to pick i put was 20, you cannot pick up more then 3 from the enemy, but if ur teamate preses the drop grade key then it has no problems.
Allies dont drop nades on the ground when they die.
anwari is offline
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 04-16-2007 , 23:15   Re: Plugin Not Working on Linux?
Reply With Quote #9

Quote:
Originally Posted by anwari View Post
Ok here is the bugs that it currently has...

After that little fix you did it now compiles fine with amxx 1.76c

Only axis drop nades when they die
even doh max amount of nades aloud to pick i put was 20, you cannot pick up more then 3 from the enemy, but if ur teamate preses the drop grade key then it has no problems.
Allies dont drop nades on the ground when they die.
Try it again. I didn't notice the other dod_get_user_ammo native usage. I havn't tested it though so that up to you.
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
anwari
Junior Member
Join Date: Apr 2007
Old 04-16-2007 , 23:32   Re: Plugin Not Working on Linux?
Reply With Quote #10

And now this again when i try to recompile it


temp.sma(420) : error 017: undefined symbol "AMMO_GREN"
temp.sma(420) : error 088: number of arguments does not match definition

2 Errors.
Could not locate output file ../amxx/dod_dropgrenades2.1.76c.amx (compile failed).
anwari 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 06:38.


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