AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Plugin Not Working on Linux? (https://forums.alliedmods.net/showthread.php?t=53634)

Wilson [29th ID] 04-07-2007 22:48

Plugin Not Working on Linux?
 
1 Attachment(s)
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.

anwari 04-11-2007 09:09

Re: Plugin Not Working on Linux?
 
Some 1 please try to fix this plugin, alot of people need this.

anwari 04-15-2007 01:53

Re: Plugin Not Working on Linux?
 
Any 1 please... :oops:

Da_sk8rboy 04-15-2007 03:16

Re: Plugin Not Working on Linux?
 
Don't bump.

teame06 04-16-2007 14:26

Re: Plugin Not Working on Linux?
 
6 Attachment(s)
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.

anwari 04-16-2007 18:53

Re: Plugin Not Working on Linux?
 
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).

teame06 04-16-2007 19:18

Re: Plugin Not Working on Linux?
 
Quote:

Originally Posted by anwari (Post 465984)
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.

anwari 04-16-2007 22:29

Re: Plugin Not Working on Linux?
 
Ok here is the bugs that it currently has...

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

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.

teame06 04-16-2007 23:15

Re: Plugin Not Working on Linux?
 
Quote:

Originally Posted by anwari (Post 466101)
Ok here is the bugs that it currently has...

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

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.

anwari 04-16-2007 23:32

Re: Plugin Not Working on Linux?
 
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).


All times are GMT -4. The time now is 06:38.

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