Raised This Month: $51 Target: $400
 12% 

Team Objectives - Slay Losers (OLO)


Post New Thread Reply   
 
Thread Tools Display Modes
vandercal
Member
Join Date: Apr 2004
Location: Sweden
Old 04-25-2004 , 09:40  
Reply With Quote #11

I got these errors when I compiled the sma file, with the amxx compiler that came with amxx 0.16. And used that amx file.

And now I tried the amx file above, and it all worked fine. So right now, I dont know what to believe.

Is the sma file uptodate?
Did you use another compiler?
__________________
vandercal is offline
vandercal
Member
Join Date: Apr 2004
Location: Sweden
Old 05-08-2004 , 09:43  
Reply With Quote #12

A bug...

When the players get killed by the slay loser plugin, they get a frag more on their score. From what I can see, I think its got something to do with these functions:

user_kill(id,1)
set_user_frags(id, get_user_frags(id)+1)

Best Regards
/Van der Cal
__________________
vandercal is offline
vandercal
Member
Join Date: Apr 2004
Location: Sweden
Old 05-11-2004 , 19:14  
Reply With Quote #13

user_kill(id, flag)

if flag=1 then it will kill the player, but it wont take a frag.

So what this is doing, its killing the person and then you are giving 1 to his frags, thus he will end up with +1 to his/hers frags.

Simply remove this line:
set_user_frags(id, get_user_frags(id)+1)
and the plugin will work like a charm.

Or you can change the line:
user_kill(id, 1)
To:
user_kill(id, 0)
and remove:
set_user_frags(id, get_user_frags(id)+1)
Then the player will end up with -1 to his/hers frags.

Best Regards
/ Van der Cal
__________________
vandercal is offline
IceNine
New Member
Join Date: Jun 2004
Old 06-03-2004 , 16:19  
Reply With Quote #14

guys, what would i need to do in order to get these plug-ins to work with CZ? especially this mod, i'm a big fan of it.

we just started a new CZ server but without having the right plug-ins the admins will go crazy with T-says to herd the tools out.

thanks in advance


Icenine
IceNine is offline
Burnzy
Veteran Member
Join Date: Apr 2004
Old 06-03-2004 , 18:35  
Reply With Quote #15

its called, look in topics, and manuels
__________________
Burnzy is offline
Send a message via AIM to Burnzy
IceNine
New Member
Join Date: Jun 2004
Old 06-04-2004 , 10:37  
Reply With Quote #16

and a manuEl is?
IceNine is offline
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 06-04-2004 , 11:07  
Reply With Quote #17

Quote:
Originally Posted by vandercal
Oh well, would have been fun to know why, but atleast it works for me with the few changes I made.

Its really simple these lines dont work for me:
get_players(player, playersnum, "ae", "CT")
get_players(player, playersnum, "ae", "TERRORIST")

Well it had one of those ?:s in the code, but I changed it to be able to see better. Anyway, they returns:
playersnum: 0
player: nada

Tried running both rows, and it said 0 still, even though I was alive.

Go figure...
I just experienced this, but with another plugin (my lastmanbets http://forums.alliedmods.net/showthread.php?p= ) it also used those exact same lines that you have troubles with:

get_players(player, playersnum, "ae", "CT")
get_players(player, playersnum, "ae", "TERRORIST")

It used to work, actuallty Ive been using those natives for more than a year but all of a sudden today they stopped working. Liek from one compile to the other. I suspect something fishy is going on, might be something to report as a amxx bug. :-\
So in my plugin so far I had to replace those natives with manually going through all players, checking connected, alive and team, counting them and storing their ids...
Johnny got his gun is offline
Nordex
Junior Member
Join Date: Apr 2004
Old 06-15-2004 , 11:59  
Reply With Quote #18

Can anyone update this plugin so it works okey with CS:CZ?

Dosen't work correct when Valve released CS:CZ v1.2.

correct me if i have wrong

Thnxs!
Nordex is offline
Nordex
Junior Member
Join Date: Apr 2004
Old 06-16-2004 , 15:15  
Reply With Quote #19

Can somebody help me get this plugin (Team Objectives - Slay Losers (OLO)) to work with CS:CZ?

I can't code so i have to ask you.

It worked okey with CS:CZ 1.1 but when CS:CZ 1.2 released it stopped to work. Is it something to do with the new players models?
Nordex is offline
haderlump
Member
Join Date: Jun 2004
Location: ca
Old 07-02-2004 , 21:02  
Reply With Quote #20

i removed the slaying so now you just get the cool effects and the message about ~being scurred to do the mission...

its a fun wth? on my 10man pub -- the slay_ing version was too harsh but now its neat to see the FX & players get the message (sorta)..

combine it with my setup of anticamping and your rounds will be good.
(attach.)
======================================
Code:
/* AMX MOD X script. 
* This file is provided as is with no warranty. 
*
* Presenting: Slay Losers
* 
* Effect: Losing the objective results in a random orgy of GFX destruction
*	   for the losing team (everyone on the losing team DIES).
*  
* NOTE: The slaying will NOT remove frags.
*
* CVAR: Set mp_slaylosers to 0 if you want to turn it off. 
*
* Written by: Denkkar Seffyd, now in a seperate WC3 independent package (no XP removal though)
*
* Install: compile then add slaylosers.amx to addons/amx/plugin.ini
*         
*/ 

#include <amxmodx> 
#include <amxmisc>
	

new white
new lightning
new g_sModelIndexSmoke


public plugin_init(){ 
                     
    register_plugin("AMX Slay Losers","1.0","[email protected]") 
    register_event("SendAudio","end_round","a","2=%!MRAD_terwin","2=%!MRAD_ctwin","2=%!MRAD_rounddraw") 
    
    register_cvar("mp_slaylosers","1",FCVAR_SERVER)
    
    return PLUGIN_CONTINUE 
} 


public end_round(){
        
    // Only active if CVAR is not equal to 0
    if( get_cvar_num("mp_slaylosers") ){
        new parm[32] 
        new len = read_data(2,parm,31) 
        set_task(1.0,"slay_those_losers",0,parm, len + 1)
    }
        
    return PLUGIN_CONTINUE
}

// Slays each player who failed to stop the other team from completing the objective.
// A random slay method is chosen for each player.
public slay_those_losers(parm[]) { 
	new origin[3], srco[3]
	new player[32], playersnum 
	new id
			
	get_players(player,playersnum,"ea",(parm[7] == 't') ? "CT" : "TERRORIST" ) 
	
	for(new i = 0; i < playersnum; ++i){	
		id = player[i]	
		get_user_origin(id,origin)			
		origin[2] -= 26
		srco[0]=origin[0]+150
		srco[1]=origin[1]+150
		srco[2]=origin[2]+800
		switch(random_num(1,3)){	
			case 1:{
				slay_lightning(srco,origin)
				emit_sound(id,CHAN_ITEM, "ambience/thunder_clap.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
			}
			case 2:{
				slay_blood(origin)
				emit_sound(id,CHAN_ITEM, "weapons/headshot2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
			}
			case 3:	{
				slay_explode(origin)
				emit_sound(id,CHAN_ITEM, "weapons/explode3.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
			}
		}
		set_hudmessage(178, 14, 41, -1.0, -0.4, 1, 0.5, 1.7, 0.2, 0.2,5);
		show_hudmessage(id, "Objective Failed^npoint deduction, ^nStick Together!!!" );
//		user_kill(id,1)	
                set_user_frags(id, get_user_frags(id)-1)
	}	
} 
	

slay_explode(vec1[3]) { 
	// blast circles 
	message_begin( MSG_BROADCAST,SVC_TEMPENTITY,vec1) 
	write_byte( 21 ) 
	write_coord(vec1[0]) 
	write_coord(vec1[1]) 
	write_coord(vec1[2] + 16) 
	write_coord(vec1[0]) 
	write_coord(vec1[1]) 
	write_coord(vec1[2] + 1936) 
	write_short( white ) 
	write_byte( 0 ) // startframe 
	write_byte( 0 ) // framerate 
	write_byte( 2 ) // life 
	write_byte( 16 ) // width 
	write_byte( 0 ) // noise 
	write_byte( 188 ) // r 
	write_byte( 220 ) // g 
	write_byte( 255 ) // b 
	write_byte( 255 ) //brightness 
	write_byte( 0 ) // speed 
	message_end()
	//Explosion2 
	message_begin( MSG_BROADCAST,SVC_TEMPENTITY) 
	write_byte( 12 ) 
	write_coord(vec1[0]) 
	write_coord(vec1[1]) 
	write_coord(vec1[2]) 
	write_byte( 188 ) // byte (scale in 0.1's) 
	write_byte( 10 ) // byte (framerate) 
	message_end()
	//Smoke 
	message_begin( MSG_BROADCAST,SVC_TEMPENTITY,vec1) 
	write_byte( 5 ) 
	write_coord(vec1[0]) 
	write_coord(vec1[1]) 
	write_coord(vec1[2]) 
	write_short( g_sModelIndexSmoke ) 
	write_byte( 2 )  
	write_byte( 10 )  
	message_end()
} 

slay_blood(vec1[3]) { 
	//LAVASPLASH 
	message_begin( MSG_BROADCAST,SVC_TEMPENTITY) 
	write_byte( 10 ) 
	write_coord(vec1[0]) 
	write_coord(vec1[1]) 
	write_coord(vec1[2]) 
	message_end() 
} 

slay_lightning(vec1[3],vec2[3]) { 
	//Lightning 
	message_begin( MSG_BROADCAST,SVC_TEMPENTITY) 
	write_byte( 0 ) 
	write_coord(vec1[0]) 
	write_coord(vec1[1]) 
	write_coord(vec1[2]) 
	write_coord(vec2[0]) 
	write_coord(vec2[1]) 
	write_coord(vec2[2]) 
	write_short( lightning ) 
	write_byte( 1 ) // framestart 
	write_byte( 5 ) // framerate 
	write_byte( 2 ) // life 
	write_byte( 20 ) // width 
	write_byte( 30 ) // noise 
	write_byte( 200 ) // r, g, b 
	write_byte( 200 ) // r, g, b 
	write_byte( 200 ) // r, g, b 
	write_byte( 200 ) // brightness 
	write_byte( 200 ) // speed 
	message_end()
	//Sparks 
	message_begin( MSG_PVS, SVC_TEMPENTITY,vec2) 
	write_byte( 9 ) 
	write_coord( vec2[0] ) 
	write_coord( vec2[1] ) 
	write_coord( vec2[2] ) 
	message_end()
	//Smoke     
	message_begin( MSG_BROADCAST,SVC_TEMPENTITY,vec2) 
	write_byte( 5 ) 
	write_coord(vec2[0]) 
	write_coord(vec2[1]) 
	write_coord(vec2[2]) 
	write_short( g_sModelIndexSmoke ) 
	write_byte( 10 )  
	write_byte( 10 )  
	message_end()
}

	
public plugin_precache() {
	
	g_sModelIndexSmoke = precache_model("sprites/steam1.spr")
	lightning = precache_model("sprites/lgtning.spr")
	white = precache_model("sprites/white.spr")
	precache_sound( "ambience/thunder_clap.wav")
	precache_sound( "weapons/headshot2.wav")
	precache_sound( "weapons/explode3.wav")

	
	return PLUGIN_CONTINUE
}
__________________
\/V olderguyz' US-central 16-man CS:S 100tic V\/
* FF+reflects * no-scope auto$nipes * FREE pistols! *
* 3-shot AWP! * Dust2's,etc * spawnflash punish *
Admin/reserve-slots to mature regulars- www.oldguyz.info
real-time HLstatsX @ www.uscss.info

Last edited by Brad; 08-04-2006 at 14:59. Reason: remove incorrect SMA file
haderlump is offline
Send a message via Skype™ to haderlump
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 16:08.


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