AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Repair plugin (https://forums.alliedmods.net/showthread.php?t=76519)

PoSiTiOn Of PoWeR 08-26-2008 07:01

Repair plugin
 
PHP Code:

#include <amxmodx>
#include <amxmisc>

#define PLUGIN_NAME   "New AMXX Plugin"
#define PLUGIN_AUTHOR   "SAMURAI"
#define PLUGIN_VERSION   "0.1"

new bool:g_bl_Firstround false;

public 
plugin_init()
{
   
register_plugin(PLUGIN_NAMEPLUGIN_AUTHORPLUGIN_VERSION);
   
register_event("HLTV","event_new_round","a","1=0","2=0");
   
}

public 
event_new_round()
{
   if(
g_bl_Firstround)
      return;
   
   static 
players[32],inum,i;
   
get_players(players,inum);
   for(
0inumi++)
   {
      if(!
is_user_connected(players[i]))
         continue;
      
      
message_begin(MSG_ONE,get_user_msgid("ScreenFade"), {0,0,0}, players[i]);
      
write_short(fade_units_to_seconds(10));
      
write_short(fade_units_to_seconds(10));
      
write_short(0x0001);
      
write_short(0);
      
write_short(0);
      
write_short(0);
      
write_byte(255);   
      
message_end();
      
      
set_hudmessage();
      
show_hudmessage(0,"Wait 10 seconds to start the game!");
      
   }
   
   
g_bl_Firstround true;
}

stock fade_units_to_seconds(num)
{
   return ((
1<<12) * (num));


Error:

http://i305.photobucket.com/albums/n...nHD/errors.gif

Arkshine 08-26-2008 07:05

Re: Repair plugin
 
Color are bytes.

write_byte(0);
write_byte(0);
write_byte(0);

Brad 08-26-2008 07:22

Re: Repair plugin
 
Moved from "Sugggestions/Requests" to "Scripting Help".

PoSiTiOn Of PoWeR 08-26-2008 07:24

Re: Repair plugin
 
do not work

PHP Code:

#include <amxmodx>
#include <amxmisc>

#define PLUGIN_NAME   "New AMXX Plugin"
#define PLUGIN_AUTHOR   "SAMURAI"
#define PLUGIN_VERSION   "0.1"

new bool:g_bl_Firstround false;

public 
plugin_init()
{
   
register_plugin(PLUGIN_NAMEPLUGIN_AUTHORPLUGIN_VERSION);
   
register_event("HLTV","event_new_round","a","1=0","2=0");
   
}

public 
event_new_round()
{
   if(
g_bl_Firstround)
      return;
   
   static 
players[32],inum,i;
   
get_players(players,inum);
   for(
0inumi++)
   {
      if(!
is_user_connected(players[i]))
         continue;
      
      
message_begin(MSG_ONE,get_user_msgid("ScreenFade"), {0,0,0}, players[i]);
      
write_short(fade_units_to_seconds(10));
      
write_short(fade_units_to_seconds(10));
      
write_short(0x0001);
      
write_byte(0);
      
write_byte(0);
      
write_byte(0);  
      
message_end();
      
      
set_hudmessage();
      
show_hudmessage(0,"Wait 10 seconds to start the game!");
      
   }
   
   
g_bl_Firstround true;
}

stock fade_units_to_seconds(num)
{
   return ((
1<<12) * (num));


http://i305.photobucket.com/albums/n...HD/errors2.jpg

Exolent[jNr] 08-26-2008 07:27

Re: Repair plugin
 
This time you forgot the alpha.

Code:

      write_byte(255);
http://wiki.amxmodx.org/Half-Life_1_...nts#ScreenFade


All times are GMT -4. The time now is 03:02.

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