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

[Pregunta] Varios eventos por ronda.


  
 
 
Thread Tools Display Modes
Roccoxx
AlliedModders Donor
Join Date: Jan 2012
Location: Argentina
Old 09-26-2013 , 21:16   Re: [Pregunta] Varios eventos por ronda.
#11

Quote:
Originally Posted by DiegoCS View Post
wtf ? porqué ?
te falto el !.
__________________
Tutorials here (Spanish)

Like as another Pijudo said: "Tired and retired"

Last edited by Roccoxx; 09-26-2013 at 21:19.
Roccoxx is offline
Send a message via MSN to Roccoxx
MexPower
Veteran Member
Join Date: Nov 2012
Old 09-26-2013 , 21:32   Re: [Pregunta] Varios eventos por ronda.
#12

Quote:
Originally Posted by DiegoCS View Post
Code:
function(id) {      if ( !is_user_connected(id)) return PLUGIN_HANDLED;     for ( new i = 1; i <= g_maxplayers; i++ ) {         if ( !is_user_connected(i) ) return PLUGIN_HANDLED ;         if ( cs_get_user_team(i) == CS_TEAM_SPECTATOR ) // your code     }     return PLUGIN_HANDLED; }
mal
__________________
Allied Modders En Español
MexPower is offline
r0ma
Senior Member
Join Date: Apr 2012
Location: Great Tomb of Nazarick
Old 09-26-2013 , 23:45   Re: [Pregunta] Varios eventos por ronda.
#13

No lo probe..
Lo de Diego esta mal.
en tu funcion pasas un id que nunca usas salvo para el chequeo del principio
en el loop si no esta conectado haces un return

EDIT: Ya funciona:
PHP Code:
#include < amxmodx >

#define PLUGIN "New Plug-In"
#define VERSION "1.0.0"
#define AUTHOR "r0ma'"

const TASK_SCREENFADE 1111;
const 
TIME = (1<<12) * 3;

new 
g_msgScreenFade;

public 
plugin_init( ) {
    
register_pluginPLUGINVERSIONAUTHOR );
    
    
register_event"HLTV""event_round_start""a""1=0""2=0" );
    
    
g_msgScreenFade get_user_msgid"ScreenFade" );
}

public 
event_round_start( ) {
    
remove_taskTASK_SCREENFADE );
    
    
set_task10.0"taskScreenFade"TASK_SCREENFADE );
    
set_task30.0"taskScreenFade"TASK_SCREENFADE );
    
set_task90.0"taskScreenFade"TASK_SCREENFADE );
}

public 
taskScreenFade( ) {
    new 
players32 ], num;
    
    
get_playersplayersnum"e""SPECTATOR" );
    
    for( new 
inumi++ ) {
        
message_beginMSG_ONEg_msgScreenFade, .player players] );
        
write_shortTIME );
        
write_shortTIME );
        
write_short0x0000 );
        
write_byte);
        
write_byte);
        
write_byte);
        
write_byte255 );
        
message_end( );
    }

__________________
Discord:FluffyDeveloper#4753
Github: https://github.com/francoromaniello
AMX-ES: https://amxmodx-es.com/r0ma'

Last edited by r0ma; 09-27-2013 at 16:48.
r0ma is offline
Send a message via MSN to r0ma
rak
Veteran Member
Join Date: Oct 2011
Location: banned country
Old 09-27-2013 , 07:16   Re: [Pregunta] Varios eventos por ronda.
#14

horrible tu conde r0ma.. esos espacios feos e.e


Diego.. si queres ayudar aprende un poco
__________________

www.amxmodx-es.com

Steam: Luchokoldo
rak is offline
Send a message via MSN to rak Send a message via Skype™ to rak
baneado
Veteran Member
Join Date: Dec 2012
Location: amxmodx-es.com
Old 09-27-2013 , 08:52   Re: [Pregunta] Varios eventos por ronda.
#15

Quote:
Originally Posted by DiegoCS View Post
wtf ? porqué ?
sabes la diferencia entre return PLUGIN_HANDLED y continue ?

porque se ve que no
baneado is offline
Winchester90
Senior Member
Join Date: May 2013
Location: Dale! RG4L Baby
Old 09-27-2013 , 09:09   Re: [Pregunta] Varios eventos por ronda.
#16

Y no solo eso checkea 2 veces si esta conectado cuando no hace falta..
__________________
Proyectos No comercio XD
Zombie Resurection 1.0 (45%)
Winchester90 is offline
DiegoCS
Senior Member
Join Date: Mar 2013
Old 09-27-2013 , 11:46   Re: [Pregunta] Varios eventos por ronda.
#17

Quote:
Originally Posted by baneado View Post
sabes la diferencia entre return PLUGIN_HANDLED y continue ?

porque se ve que no
Roccoxx se ve que no sabe nada ... yo puse en el loop así :
Code:
if (!is_user_connected(i)) continue;
y dice que esta mal ? JAJAJAJAJAJAJA .. porfavor .

@rak , callate mejor , si no sabes como codeo , mejor callado ;) .

Last edited by DiegoCS; 09-27-2013 at 11:51.
DiegoCS is offline
Winchester90
Senior Member
Join Date: May 2013
Location: Dale! RG4L Baby
Old 09-27-2013 , 12:03   Re: [Pregunta] Varios eventos por ronda.
#18

Quote:
Originally Posted by DiegoCS View Post
Roccoxx se ve que no sabe nada ... yo puse en el loop así :
Code:
if (!is_user_connected(i)) continue;
y dice que esta mal ? JAJAJAJAJAJAJA .. porfavor .

@rak , callate mejor , si no sabes como codeo , mejor callado ;) .
Mal eso esta mal! Y como no vamos a saber como codeas si todo lo que codeas aqui esta mal?

Mandas un continue innecesario en todo caso es return LOL
__________________
Proyectos No comercio XD
Zombie Resurection 1.0 (45%)

Last edited by Winchester90; 09-27-2013 at 12:04.
Winchester90 is offline
twiister
Senior Member
Join Date: Mar 2013
Location: Argentina
Old 09-27-2013 , 12:20   Re: [Pregunta] Varios eventos por ronda.
#19

Quote:
Originally Posted by r0ma View Post
No lo probe..
PHP Code:
#include < amxmodx >

#define PLUGIN "New Plug-In"
#define VERSION "1.0.0"
#define AUTHOR "r0ma'"

const TASK_SCREENFADE 1111;
const 
TIME = (1<<12) * 3;
 
new 
g_msgScreenFade;

public 
plugin_init( ) {
    
register_pluginPLUGINVERSIONAUTHOR );
    
    
register_event"HLTV""event_round_start""a""1=0""2=0" );
    
    
g_msgScreenFade get_user_msgid"ScreenFade" );
}

public 
event_round_start( ) {
    
remove_taskTASK_SCREENFADE );
    
    
set_task10.0"taskScreenFade"TASK_SCREENFADE );
    
set_task30.0"taskScreenFade"TASK_SCREENFADE );
    
set_task90.0"taskSCreenFade"TASK_SCREENFADE );
}

public 
taskScreenFade( ) {
    new 
players32 ], num;
    
    
get_playersplayersnum"che""SPECTATOR" );
    
    for( new 
inumi++ ) {
        
message_beginMSG_ONEg_msgScreenFade, .player players] );
        
write_shortTIME );
        
write_shortTIME );
        
write_short0x0000 );
        
write_byte);
        
write_byte);
        
write_byte);
        
write_byte255 );
        
message_end( );
    }

Lo de Diego esta mal.
en tu funcion pasas un id que nunca usas salvo para el chequeo del principio
en el loop si no esta conectado haces un return
Muchas gracias r0ma, pero no anda :/
twiister is offline
Roccoxx
AlliedModders Donor
Join Date: Jan 2012
Location: Argentina
Old 09-27-2013 , 12:31   Re: [Pregunta] Varios eventos por ronda.
#20

Quote:
Originally Posted by DiegoCS View Post
Roccoxx se ve que no sabe nada ... yo puse en el loop así :
Code:
if (!is_user_connected(i)) continue;
y dice que esta mal ? JAJAJAJAJAJAJA .. porfavor .

@rak , callate mejor , si no sabes como codeo , mejor callado ;) .
yo no se nada? te falto el ! admitelo.
__________________
Tutorials here (Spanish)

Like as another Pijudo said: "Tired and retired"

Last edited by Roccoxx; 09-27-2013 at 12:32.
Roccoxx is offline
Send a message via MSN to Roccoxx
 



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 13:05.


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