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

task problem


Post New Thread Reply   
 
Thread Tools Display Modes
wickedd
Veteran Member
Join Date: Nov 2009
Old 10-22-2017 , 15:32   Re: task problem
Reply With Quote #11

Quote:
Originally Posted by fysiks View Post
so you must include csx before the forward will even work.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
KiLLeR.
Senior Member
Join Date: Jul 2014
Location: Bulgaria
Old 10-22-2017 , 15:59   Re: task problem
Reply With Quote #12

But removing task in bomb_planted() will acutally do nothing, because this task doesn't exist anymore.

Last edited by KiLLeR.; 10-22-2017 at 16:21.
KiLLeR. is offline
A k c 3 n 7
Junior Member
Join Date: Oct 2014
Location: Romania
Old 10-23-2017 , 09:46   Re: task problem
Reply With Quote #13

this is full plugin
Code:
/*.qggL  *  .gggr.  .         '            .              *            .     + 
  PMML  . /|MM        '.       +                    '                  
  |!MM,' /`|MM  .d/"q,  qgg;+Ml qgg;+Ml vgg. .y.            Vv   Vv   Vv   Vv
  | YMM,j' |MM  MM;.jMl |MM` "  |MM` "   qM| j`   x  O      o,   o,   o,   o,
  |  qM#'  |MM  MM|     |MM  +  |MM    .  MMg'  /(_){-}+--===--===--===--===
.j|.  qF  .+MM..'MMbxr` jMM.    jMM.  *   'MF   \=====/   > >  > >  > >  > >
 .   *                                  x, /
  .x/--\xxl ,xx     .   *     ,gb       v#' .        . '                 *
.dMT    'q| |MM  '            '"'         .dM               *
dMM  *    ` |MM/dMg,  qgg;+Ml qgg  j/"`+  qMM-. qgg/dM#,w#Mb  ,g'`fg, j/"`+
MMM    .'   |MM  MM|  |MM` "  |MM  MMbx/  |MM   |MM  |M|  MM  `p'. M| MMbx/
'MMl  +   . |MM  MM|  |MM  .  |MM  .`vMMl |MM   |MM  |M|  MM  , ,!. | .`vMMl
 'vMb...r/` jMM..MM|. jMM.  + jMM. +,.,P' 'MMx: jMM..dM|..MM, M j't | +,.*/


#include < amxmodx > 
#include < cstrike >
#include < engine >
#include < ColorChat >

/*==================================================================*/

new const PlantedSound[ ] = "xmas/xmas_bomb_planted.mp3";

public plugin_init( ) {

      register_plugin("[XMAS] Bomb Events", "1.0", "A k c 3 n 7");
      register_logevent("RoundEnd", 2, "1=Round_End")  
}

public plugin_precache( ) {

       precache_sound(PlantedSound);
//     engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "env_snow"));
}

public bomb_planted( Client ) {

  
       PlaySoundToClients (PlantedSound);
       
       new Name[32];
       get_user_name( Client, Name, sizeof ( Name ) -1 );
   
       cs_set_user_money(Client, cs_get_user_money(Client) + 300);
       ColorChat(0, GREEN, "^x04 [XMAS]^x03 jucatorul^x04 %s^x03 a primit^x04 300$^x03 pentru ca a impodobit Bradul", Name);

       /*==========================================================================================================*/
}

public bomb_planting(Client) {

       if( is_user_bot( Client ) || is_user_hltv( Client ) )
		return;
	
       if( !task_exists( Client ) )
       set_task( 0.1, "task_MakeFogToPlayer", Client, _,_, "b");
}

public task_MakeFogToPlayer( Client )
{
	
	if( !is_user_connected( Client ) )
		return;
		
	MakeFog( Client, 255, 255, 255, 111, 18, 3, 58 );
	
}

public RoundEnd( Client ) {

       remove_task( Client );
}      

public bomb_defused( Client ) {
       
       new Name[32];
       get_user_name( Client, Name, sizeof ( Name ) -1 );

       cs_set_user_money(Client, cs_get_user_money(Client) + 300); 
       ColorChat(0, GREEN, "^x04 [XMAS]^x03 jucatorul^x04 %s^x03 a primit^x04 300$^x03 pentru ca a salvat Craciunul", Name);  
}

MakeFog( Client, const iRed, const iGreen, const iBlue, const iSD, const iED, const iD1, const iD2 )
{
	new iMsgIdFog;
	
	message_begin( Client == 0 ? MSG_ALL : MSG_ONE_UNRELIABLE, !iMsgIdFog ? ( iMsgIdFog = get_user_msgid( "Fog" ) ) : iMsgIdFog, {0, 0, 0}, Client );
	write_byte( iRed );  // R
	write_byte( iGreen );  // G
	write_byte( iBlue );  // B
	write_byte( iSD ); // SD
	write_byte( iED );  // ED
	write_byte( iD1 );   // D1
	write_byte( iD2 );  // D2
	message_end(  );
}

PlaySoundToClients ( const sound [ ] )
{
        if ( equal ( sound [ strlen ( sound ) -4 ], ".mp3" ) )
                client_cmd ( 0, "mp3 play ^"sound/%s^"", sound );
        else
                client_cmd ( 0, "spk ^"%s^"", sound );
}
when RoundEnd fog is still on server
__________________


Last edited by A k c 3 n 7; 10-23-2017 at 09:48.
A k c 3 n 7 is offline
GrimmReaper
Junior Member
Join Date: Oct 2017
Location: Name's the Clue
Old 10-23-2017 , 22:59   Re: task problem
Reply With Quote #14

Quote:
Originally Posted by A k c 3 n 7 View Post
this is full plugin
Code:
/*.qggL  *  .gggr.  .         '            .              *            .     + 
  PMML  . /|MM        '.       +                    '                  
  |!MM,' /`|MM  .d/"q,  qgg;+Ml qgg;+Ml vgg. .y.            Vv   Vv   Vv   Vv
  | YMM,j' |MM  MM;.jMl |MM` "  |MM` "   qM| j`   x  O      o,   o,   o,   o,
  |  qM#'  |MM  MM|     |MM  +  |MM    .  MMg'  /(_){-}+--===--===--===--===
.j|.  qF  .+MM..'MMbxr` jMM.    jMM.  *   'MF   \=====/   > >  > >  > >  > >
 .   *                                  x, /
  .x/--\xxl ,xx     .   *     ,gb       v#' .        . '                 *
.dMT    'q| |MM  '            '"'         .dM               *
dMM  *    ` |MM/dMg,  qgg;+Ml qgg  j/"`+  qMM-. qgg/dM#,w#Mb  ,g'`fg, j/"`+
MMM    .'   |MM  MM|  |MM` "  |MM  MMbx/  |MM   |MM  |M|  MM  `p'. M| MMbx/
'MMl  +   . |MM  MM|  |MM  .  |MM  .`vMMl |MM   |MM  |M|  MM  , ,!. | .`vMMl
 'vMb...r/` jMM..MM|. jMM.  + jMM. +,.,P' 'MMx: jMM..dM|..MM, M j't | +,.*/


#include < amxmodx > 
#include < cstrike >
#include < engine >
#include < ColorChat >

/*==================================================================*/

new const PlantedSound[ ] = "xmas/xmas_bomb_planted.mp3";

public plugin_init( ) {

      register_plugin("[XMAS] Bomb Events", "1.0", "A k c 3 n 7");
      register_logevent("RoundEnd", 2, "1=Round_End")  
}

public plugin_precache( ) {

       precache_sound(PlantedSound);
//     engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "env_snow"));
}

public bomb_planted( Client ) {

  
       PlaySoundToClients (PlantedSound);
       
       new Name[32];
       get_user_name( Client, Name, sizeof ( Name ) -1 );
   
       cs_set_user_money(Client, cs_get_user_money(Client) + 300);
       ColorChat(0, GREEN, "^x04 [XMAS]^x03 jucatorul^x04 %s^x03 a primit^x04 300$^x03 pentru ca a impodobit Bradul", Name);

       /*==========================================================================================================*/
}

public bomb_planting(Client) {

       if( is_user_bot( Client ) || is_user_hltv( Client ) )
		return;
	
       if( !task_exists( Client ) )
       set_task( 0.1, "task_MakeFogToPlayer", Client, _,_, "b");
}

public task_MakeFogToPlayer( Client )
{
	
	if( !is_user_connected( Client ) )
		return;
		
	MakeFog( Client, 255, 255, 255, 111, 18, 3, 58 );
	
}

public RoundEnd( Client ) {

       remove_task( Client );
}      

public bomb_defused( Client ) {
       
       new Name[32];
       get_user_name( Client, Name, sizeof ( Name ) -1 );

       cs_set_user_money(Client, cs_get_user_money(Client) + 300); 
       ColorChat(0, GREEN, "^x04 [XMAS]^x03 jucatorul^x04 %s^x03 a primit^x04 300$^x03 pentru ca a salvat Craciunul", Name);  
}

MakeFog( Client, const iRed, const iGreen, const iBlue, const iSD, const iED, const iD1, const iD2 )
{
	new iMsgIdFog;
	
	message_begin( Client == 0 ? MSG_ALL : MSG_ONE_UNRELIABLE, !iMsgIdFog ? ( iMsgIdFog = get_user_msgid( "Fog" ) ) : iMsgIdFog, {0, 0, 0}, Client );
	write_byte( iRed );  // R
	write_byte( iGreen );  // G
	write_byte( iBlue );  // B
	write_byte( iSD ); // SD
	write_byte( iED );  // ED
	write_byte( iD1 );   // D1
	write_byte( iD2 );  // D2
	message_end(  );
}

PlaySoundToClients ( const sound [ ] )
{
        if ( equal ( sound [ strlen ( sound ) -4 ], ".mp3" ) )
                client_cmd ( 0, "mp3 play ^"sound/%s^"", sound );
        else
                client_cmd ( 0, "spk ^"%s^"", sound );
}
when RoundEnd fog is still on server
Give the task make fog to player a unique id and in the forward round end in the function remove_task put the unique id instead of client
Currently I am doing this from phone so I will give you the code later that is if you can't do it yourself
__________________
Add Me On Steam
GrimmReaper is offline
A k c 3 n 7
Junior Member
Join Date: Oct 2014
Location: Romania
Old 10-24-2017 , 06:31   Re: task problem
Reply With Quote #15

which is unique id?
__________________

A k c 3 n 7 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 05:15.


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