Raised This Month: $ Target: $400
 0% 

[HELP] where is the error?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wesscd
Junior Member
Join Date: Sep 2010
Old 05-07-2015 , 12:23   [HELP] where is the error?
Reply With Quote #1

hi guys, I need help, I am not able to solve this puzzle, you are not going as I'd like. = (

Help me plzz...

Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta>
#include <hamsandwich>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "wesS*"

#define m_iCsTeams      114
#define m_iLinux        5

#define CONE_SPRITE "sprites/spr_cone.spr"
#define NINJA_SPRITE 	"sprites/spr_ninja.spr"
#define STREAKER_SPRITE 	"sprites/spr_morte.spr"
#define SNIPER_SPRITE "sprites/spr_alvo.spr"
#define NOOB_SPRITE "sprites/spr_noob.spr"

new sprConE
new sprNooB
new sprSniper
new sprStreaker
new sprNinja

new   gKills[33], gDeaths[33];
new   bool:pStreaker[33], bool:pSniper[33], bool:pNinja[33], bool:pCone[33], bool:pNooB[33]

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR);
	
	register_event("HLTV","NewRound", "a", "1=0", "2=0");
	register_logevent("StartRound", 2, "1=Round_Start") ;
	
	RegisterHam(Ham_Killed, "player", "KillerStreaker", 1)
	
	//register_event("DeathMsg","deathmsg_event", "a")
	
	// Add your code here...
}
public plugin_precache(){
	
	sprConE = precache_model( CONE_SPRITE);
	sprNooB = precache_model( NOOB_SPRITE);
	sprNinja = precache_model( NINJA_SPRITE);
	sprSniper = precache_model( SNIPER_SPRITE);
	sprStreaker = precache_model( STREAKER_SPRITE);
	//sprCS = precache_model( CS_SPRITE);
	
}
public NewRound(){
	CreateSpriteKillStreak( );
	CreateSpriteDeathStreak( );
}
public StartRound(){
	RemoveSprite()
}
public client_putinserver(id){
	
	gKills[id] = 0;
	gDeaths[ id ] = 0;
	pStreaker[ id ] = false;
	pSniper[ id ] = false;
	pNinja[ id ] = false;
	pNooB[ id ] = false;
	pCone[ id ] = false;
}

public KillerStreaker(id,attacker){ 
	
	gKills[ attacker ] ++;
	gKills[ id ] = 0;
	//gDeaths[ id ] ++;
	//gDeaths[ attacker ] = 0;
	
	if(fm_cs_get_user_team(id){
		
		if(gKills[ attacker ] >= 1){		
			
			new gKillStreak[33]
			
			gKills[attacker] = gKillStreak[attacker];
			
			if(gKillStreak[attacker] >= 3){
				
				pStreaker[ id ] = true;
				pSniper[ id ] = false;
				pNinja[ id ] = false;
				pNooB[ id ] = false;
				pCone[ id ] = false;
			} 
			if(gKillStreak[attacker] >= 5){
				
				pStreaker[ id ] = false;
				pSniper[ id ] = true;
				pNinja[ id ] = false;
				pNooB[ id ] = false;
				pCone[ id ] = false;
			} 
			if(gKillStreak[attacker] >= 7){
				
				pStreaker[ id ] = false;
				pSniper[ id ] = false;
				pNinja[ id ] = true;
				pNooB[ id ] = false;
				pCone[ id ] = false;
			}		
		}
		if(gDeaths[ id ] >=1){
			
			new gDeathStreak[33];
			
			gDeaths[ id ] = gDeathStreak[ id ];
			
			if(gDeathStreak[ id ] == 2){
				
				pStreaker[ id ] = false;
				pSniper[ id ] = false;
				pNinja[ id ] = false;
				pNooB[ id ] = true;
				pCone[ id ] = false;
			} 
			if(gDeathStreak[ id ] >= 3){
				
				pStreaker[ id ] = false;
				pSniper[ id ] = false;
				pNinja[ id ] = false;
				pNooB[ id ] = false;
				pCone[ id ] = true;
			}		
		}
	}
}
public CreateSpriteKillStreak( ){
	
	
	new players[32];
	new num, i, id;
	
	get_players(players, num);
	
	for(i = 0; i < num; i++){
		id = players[i];
		
		//if(is_user_connected(id)){
		if(pStreaker[id] == true){
			
			message_begin( MSG_ALL, SVC_TEMPENTITY );
			write_byte( TE_PLAYERATTACHMENT );
			write_byte( id );
			write_coord( 45 );
			//write_short( (pStreaker[id] == true ) ? sprStreaker : sprCS )
			write_short( sprStreaker  )
			write_short( 12345 );
			message_end();
			
		}
		if(pSniper[id] == true){
			//if(is_user_connected(id)){
			
			message_begin( MSG_ALL, SVC_TEMPENTITY );
			write_byte( TE_PLAYERATTACHMENT );
			write_byte( id );
			write_coord( 45 );
			write_short( (pSniper[id] == true ) ? sprSniper : sprCS )
			write_short( sprSniper )
			write_short( 12345 );
			message_end();
			
		}
		if(pNinja[id] == true){
			//if(is_user_connected(id)){
			
			message_begin( MSG_ALL, SVC_TEMPENTITY );
			write_byte( TE_PLAYERATTACHMENT );
			write_byte( id );
			write_coord( 45 );
			//write_short( (pNinja[id] == true ) ? sprNinja : sprCS )
			write_short( sprNinja )
			write_short( 12345 );
			message_end();
			
		}
		
		
	}
	
}

public CreateSpriteDeathStreak( ){
	
	
	new players[32];
	new num, i, id;
	
	get_players(players, num);
	
	for(i = 0; i < num; i++){
		id = players[i];
		
		//if(is_user_connected(id)){
		if(pNooB[id] == true){
			message_begin( MSG_ALL, SVC_TEMPENTITY );
			write_byte( TE_PLAYERATTACHMENT );
			write_byte( id );
			write_coord( 45 );
			//write_short( (pNooB[i] == true) ? sprNooB : sprCS )
			write_short( sprNooB )
			write_short( 12345 );
			message_end();
			
		}
		
		//if(is_user_connected(id)){
		if(pCone[id] == true){
			message_begin( MSG_ALL, SVC_TEMPENTITY );
			write_byte( TE_PLAYERATTACHMENT );
			write_byte( id );
			write_coord( 45 );
			//write_short( (pCone[i] == true) ? sprConE : sprCS )
			write_short( sprConE )
			write_short( 12345 );
			message_end();
			
		}
		
		
		
	}
}
public RemoveSprite(){
	new players[32];
	
	new num, i, id;
	
	get_players(players, num);
	
	for(i = 0; i < num; i++){
		id = players[i];
		Remove(id);
	}
}
stock Remove( index ){
	message_begin( MSG_ALL, SVC_TEMPENTITY );
	write_byte( TE_KILLPLAYERATTACHMENTS );
	write_byte( index );
	message_end();
}
stock fm_cs_get_user_team( id ){
	return get_pdata_int( id, m_iCsTeams, m_iLinux );
}
Attached Files
File Type: sma Get Plugin or Get Source (StreakSprite_Original.sma - 91 views - 5.5 KB)
wesscd is offline
Kellan123
AlliedModders Donor
Join Date: Aug 2012
Old 05-07-2015 , 16:42   Re: [HELP] where is the error?
Reply With Quote #2

What wrong in plugin ?
Kellan123 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-07-2015 , 17:29   Re: [HELP] where is the error?
Reply With Quote #3

You need to explain your issue. You can't expect someone to compile and run your plugin and try to figure out what you don't like about it.
__________________
Bugsy is offline
wesscd
Junior Member
Join Date: Sep 2010
Old 05-07-2015 , 18:50   Re: [HELP] where is the error?
Reply With Quote #4

sorry guys, then the plugin compiles perfectly and in my view has no errors in the code, I think, more basically is that it is a type of streak of deaths when a player kill three enemies without dying, this appeared on your head a symbol that represents a murdered, and if he kills five enemy another symbol and the same thing when killing seven enemies, and when the guy who dies, dies several times in a row without killing he had received on his head a cone or a meme, and nothing tried to put happens perfectly. = (

Sorry about my English.

Last edited by wesscd; 05-07-2015 at 18:54. Reason: Faltou algo
wesscd 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 03:54.


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