Raised This Month: $ Target: $400
 0% 

Module: Sven Coop Fun


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 02-07-2006 , 21:19   Module: Sven Coop Fun
Reply With Quote #1

This module, originally written by Sanji, has been re-written to fit 1.65 standards.

It has been updated in the CVS, and may eventually go into AMXx.

Code:
// Gets/sets the amount of frags a monster or player has. native Float:sc_get_frags(id); native sc_set_frags(id,Float:frags); // Gets/sets the deaths a player has. native sc_get_user_deaths(id); native sc_set_user_deaths(id,deaths); // returns 1 if entity (non-player) is an ally. native sc_is_player_ally(id); // Gets the amount of ammo an ent has. // Use the SVEN_WEP_* defines for type native sc_get_weapon_ammo(id, type) // Sets the amount of ammo an ent has. // Use the SVEN_WEP_* defines for type native sc_set_weapon_ammo(id, amount, type) //Stocks for 9mm ammo (mp5, uzi(akimbo)) stock sc_get_bpammo_9mm(id) { return sc_get_weapon_ammo(id,SVEN_WEP_9MM; }          stock sc_set_bpammo_9mm(id, amount) { return sc_set_weapon_ammo(id, amount, SVEN_WEP_9MM; } //Stocks for RPG ammo (RPG launcher) stock sc_get_bpammo_rpg(id) { return sc_get_weapon_ammo(id,SVEN_WEP_RPG; }          stock sc_set_bpammo_rpg(id, amount) { return sc_set_weapon_ammo(id, amount, SVEN_WEP_RPG; } //Stocks for radioactive ammo (gauss, egon) stock sc_get_bpammo_radio(id) { return sc_get_weapon_ammo(id,SVEN_WEP_RADIO; }          stock sc_set_bpammo_radio(id, amount) { return sc_set_weapon_ammo(id, amount, SVEN_WEP_RADIO; } //Stocks for snark ammo stock sc_get_bpammo_snark(id) { return sc_get_weapon_ammo(id,SVEN_WEP_SNARK; }          stock sc_set_bpammo_snark(id, amount) { return sc_set_weapon_ammo(id, amount, SVEN_WEP_SNARK; } //Stocks for shotgun ammo stock sc_get_bpammo_shot(id) { return sc_get_weapon_ammo(id,SVEN_WEP_SHOTGUN; }         stock sc_set_bpammo_shot(id, amount) { return sc_set_weapon_ammo(id, amount, SVEN_WEP_SHOTGUN; }

Credit to Sanji and BAIL.
Attached Files
File Type: rar svenfun.rar (74.1 KB, 852 views)
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
Willmaker
Senior Member
Join Date: Dec 2004
Location: Sydney, Australia
Old 03-16-2006 , 22:23  
Reply With Quote #2

For some reason, this modules isnt working for me as everytime I call for player deaths I get 0. I am sure the module is working properly, and have included it in my plugin, but deaths just stay at 0.

What could I be doing wrong?

Code:
; AMX Mod X Modules
; You can specify both linux & win32 modules here
; To enable a module, remove the semi-colon from the line

; ------------------------------
; Fun - provides extra functions
; ------------------------------
;fun_amxx_i386.so
fun_amxx.dll
;fun_amxx_amd64.so

; ----------------------------------------------------
; Engine - provides engine functions core to Half-Life
; ----------------------------------------------------
;engine_amxx_i386.so
engine_amxx.dll
;engine_amxx_amd64.so

; ----------------------------------------------------------
; Fakemeta - provides a massive interface into the HL engine
; ----------------------------------------------------------
;fakemeta_amxx_i386.so
fakemeta_amxx.dll
;fakemeta_amxx_amd64.so

; -------------------------------------------
; Database Access - only enable one of these
; -------------------------------------------
; MySQL
;mysql_amxx_i386.so
mysql_amxx.dll
;mysql_amxx_amd64.so
; PostgreSQL
;pgsql_amxx_i386.so
;pgsql_amxx.dll
; Microsoft SQL
;mssql_amxx.dll
; SQLite
;sqlite_amxx.dll
;sqlite_amxx_i386.so
;sqlite_amxx_amd64.so

; ---------------------------------------------
; GeoIP - determines the country of ip adresses
; ---------------------------------------------
;geoip_amxx_i386.so
geoip_amxx.dll
;geoip_amxx_amd64.so

; --------------------------------
; Sockets - network socket support
; --------------------------------
;sockets_amxx_i386.so
sockets_amxx.dll
;sockets_amxx_amd64.so

; --------------------------
; Regular Expression support
; --------------------------
;regex_amxx_i386.so
regex_amxx.dll
;regex_amxx_amd64.so

; --------------------
; Binary Vault support
; --------------------
;nvault_amxx_i386.so
;nvault_amxx.dll
;nvault_amxx_amd64.so

; ----------------------------------------------------------
; Counter-Strike - adds functions specific to Counter-Strike
; ----------------------------------------------------------
;cstrike_amxx_i386.so
cstrike_amxx.dll
;cstrike_amxx_amd64.so

; -----------------------------------------------------
; CSX - adds functionality for CS statistics and events
; -----------------------------------------------------
;csx_amxx_i386.so
csx_amxx.dll
;csx_amxx_amd64.so

sven_amxx.dll
__________________
GargStudios.net - Australian SvenCoop/Ent Server with Time Based Rewards
Willmaker is offline
Send a message via ICQ to Willmaker Send a message via AIM to Willmaker Send a message via MSN to Willmaker Send a message via Yahoo to Willmaker
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 03-17-2006 , 03:46  
Reply With Quote #3

Why is the counter strike modules enabled?!
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
Willmaker
Senior Member
Join Date: Dec 2004
Location: Sydney, Australia
Old 03-17-2006 , 04:03  
Reply With Quote #4

I was testing a few things a while ago, and forgot. Besides would it really matter?

I disabled the cstrike modules anyway, tried again, and still got 0.
__________________
GargStudios.net - Australian SvenCoop/Ent Server with Time Based Rewards
Willmaker is offline
Send a message via ICQ to Willmaker Send a message via AIM to Willmaker Send a message via MSN to Willmaker Send a message via Yahoo to Willmaker
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 03-17-2006 , 04:54  
Reply With Quote #5

perhaps the deaths pdata is off.
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
Willmaker
Senior Member
Join Date: Dec 2004
Location: Sydney, Australia
Old 03-30-2006 , 04:35  
Reply With Quote #6

Quote:
Originally Posted by Twilight Suzuka
perhaps the deaths pdata is off.
Huh? Did I miss something?

Edit - *Biggest idiot to date* I did miss something. I placed the sc_get_user_deaths in the wrong spot, causing it to be 0 everytime. >.<

Works like a charm.
__________________
GargStudios.net - Australian SvenCoop/Ent Server with Time Based Rewards
Willmaker is offline
Send a message via ICQ to Willmaker Send a message via AIM to Willmaker Send a message via MSN to Willmaker Send a message via Yahoo to Willmaker
NewUser
Member
Join Date: Mar 2006
Location: over there
Old 05-27-2006 , 01:21  
Reply With Quote #7

Will this work for the latest AMXX?
__________________
LEWL.
NewUser is offline
Willmaker
Senior Member
Join Date: Dec 2004
Location: Sydney, Australia
Old 05-27-2006 , 12:02  
Reply With Quote #8

Quote:
Originally Posted by NewUser
Will this work for the latest AMXX?
Im using 1.71 (which is the latest atm) and is working perfectly. There shouldnt be any reason why it couldnt.
__________________
GargStudios.net - Australian SvenCoop/Ent Server with Time Based Rewards
Willmaker is offline
Send a message via ICQ to Willmaker Send a message via AIM to Willmaker Send a message via MSN to Willmaker Send a message via Yahoo to Willmaker
|POW|Da_ghost
Senior Member
Join Date: Nov 2006
Location: http://snarkcafe.net
Old 11-26-2006 , 07:01   Re: Module: Sven Coop Fun
Reply With Quote #9

Nice module but for some reason if you use sc_set_frags(id,1337.0) the frags are set to 87432.
So could this be fixed ?
TIYA
ps: Sorry for the bump.
__________________
If you want me to help you with something please contact me on msn or xfire(Daghost1337)
|POW|Da_ghost is offline
Send a message via AIM to |POW|Da_ghost Send a message via MSN to |POW|Da_ghost
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 12-02-2006 , 11:47   Re: Module: Sven Coop Fun
Reply With Quote #10

Quote:
Originally Posted by |POW|Da_ghost View Post
Nice module but for some reason if you use sc_set_frags(id,1337.0) the frags are set to 87432.
So could this be fixed ?
TIYA
ps: Sorry for the bump.
This probably won't work, but just as a wild guess, try doing this:

Code:
new Frags = 5
sc_set_frags(id,Float:Frags)
That only accounts for the possibility of someone making the frags a float when they should be an int. If it's a problem other than that, this will have no effect.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
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 14:54.


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