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

Problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hamzashadow
Junior Member
Join Date: Jul 2018
Old 01-10-2019 , 18:50   Problem
Reply With Quote #1

PHP Code:
#include <amxmodx>
#include <engine>
#include <hamsandwich>
#include <engine_const>

#define PLUGIN  "[BG] Snow 1.2"
#define VERSION "1.2"
#define AUTHOR  "SHA[D]OW"

#define get_bit(%1,%2)  (%1 & (1 << (%2 & MAXCLIENTS-1)))
#define set_bit(%1,%2)  (%1 |= (1 << (%2 & MAXCLIENTS-1)))
#define reset_bit(%1,%2)        (%1 &= ~(1 << (%2 & MAXCLIENTS-1)))

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

#define MAXCLIENTS 32
#define CLASSNAME "SnowEntity"
#define bg_num 4


new g_bAlive;
new 
g_iMaxPlayers;
new 
g_num[4];
new 
mg_sprite[4][] =
{
    
"sprites/bg_snow/bg.spr",
    
"sprites/bg_snow/bg_b.spr",
    
"sprites/bg_snow/bg_c.spr",
    
"sprites/bg_snow/bg_d_1.spr"
};

FVecIVec(Float:FVec[3], IVec[3])
{
    
IVec[0] = floatround(FVec[0], floatround_round);
    
IVec[1] = floatround(FVec[1], floatround_round);
    
IVec[2] = floatround(FVec[2], floatround_round);
    return 
1;
}

public 
plugin_init()
{
    
register_plugin("[BG] Snow 1.2""0.5""SHA[D]OW");
    
register_event("HLTV""Event_NewRound""a""1=0""2=0");
    new 
ent create_entity("info_target");
    
entity_set_string(ent0"SnowEntity");
    
entity_set_float(entEV_FL_nextthinkget_gametime() + 2.00);
    
register_think("SnowEntity""ThinkSnow");
    
RegisterHam(Ham_Spawn"player""Ham_PlayerSpawn_Post"1);
    
RegisterHam(Ham_Killed"player""HamPlayerKilled_Post"1);
    
g_iMaxPlayers get_maxplayers();
    return 
0;
}

public 
plugin_precache()
{
    new 
0;
    while (
4)
    {
        
g_num[i] = precache_model(mg_sprite[i][0][0]);
        
i++;
    }
    return 
0;
}

public 
Event_NewRound(id)
{
    
set_fog(random_num(0255), random_num(0255), random_num(0255));
    
set_lights("e");
    return 
0;
}

public 
Ham_PlayerSpawn_Post(id)
{
    if (
is_user_alive(id))
    {
        
g_bAlive << id 31 g_bAlive;
    }
    return 
0;
}

public 
HamPlayerKilled_Post(id)
{
    
g_bAlive = ~<< id 31 g_bAlive;
    return 
0;
}

public 
ThinkSnow(ent)
{
    
entity_set_float(entEV_FL_nextthinkget_gametime() + 0.10);
    static 
id;
    
id 1;
    while (
id <= g_iMaxPlayers)
    {
        new 
var2 g_bAlive;
        new 
var1;
        if (!
<< id 31 var2)
        {
            
var1 var2;
        }
        else
        {
            new 
Float:fOrigin[3];
            new 
iOrigin[3];
            
entity_get_vector(id0fOrigin);
            
FVecIVec(fOriginiOrigin);
            
iOrigin[0] = random_num(-10001000) + iOrigin[0];
            new 
var3 iOrigin[1];
            
var3 random_num(-10001000) + var3;
            new 
var4 iOrigin[2];
            
var4 random_num(200350) + var4;
            new 
var5 g_num;
            
UTIL_CreateSnow(iOriginvar5[random(4)][0][0], 114);
            
var1 var5;
        }
        
id += 1;
    }
    return 
0;
}

UTIL_CreateSnow(iOrigin[3], iSpriteIDiCountiLifeiScale)
{
    
message_begin(MSG_BROADCASTSVC_TEMPENTITY14000);
    
write_byte(15);
    
write_coord(iOrigin[0]);
    
write_coord(iOrigin[1]);
    
write_coord(iOrigin[2]);
    
write_coord(iOrigin[0]);
    
write_coord(iOrigin[1]);
    
write_coord(iOrigin[2]);
    
write_short(iSpriteID);
    
write_byte(iCount);
    
write_byte(iLife);
    
write_byte(iScale);
    
write_byte(random_num(15));
    
write_byte(random_num(13));
    
message_end();
    return 
0;
}

set_fog(redgreenblue)
{
    
message_begin(MSG_ALLget_user_msgid("Fog"), 14000);
    
write_byte(red);
    
write_byte(green);
    
write_byte(blue);
    
write_long(964891247);
    
message_end();
    return 
0;


Last edited by hamzashadow; 01-16-2019 at 11:41.
hamzashadow is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 01-10-2019 , 18:57   Re: Problem Complie ( HELP )
Reply With Quote #2

And?
__________________








CrazY. is offline
Old 01-10-2019, 19:28
hamzashadow
This message has been deleted by hamzashadow.
JocAnis
Veteran Member
Join Date: Jun 2010
Old 01-10-2019 , 20:17   Re: Problem Complie ( HELP )
Reply With Quote #3

Why?
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-10-2019 , 23:11   Re: Problem Complie ( HELP )
Reply With Quote #4

Quote:
Originally Posted by hamzashadow View Post
What ?
Your title (which should be more specific) says that you have a problem yet you don't explain the problem. Always use a descriptive topic title and then explain your problem in english in your post. Also, post the the text of the errors (in this case the compiler output) that you are getting so that people can help you without having to be required to attempt compiling your code.
__________________

Last edited by fysiks; 01-10-2019 at 23:12.
fysiks is offline
eat1k
Senior Member
Join Date: Apr 2018
Old 01-11-2019 , 01:30   Re: Problem Complie ( HELP )
Reply With Quote #5

Quote:
Originally Posted by hamzashadow View Post
PHP Code:
#include <amxmodx>
#include <engine>
#include <hamsandwich>
#include <engine_const>

#define PLUGIN  "[BG] Snow 1.2"
#define VERSION "1.2"


#define get_bit(%1,%2)  (%1 & (1 << (%2 & MAXCLIENTS-1)))
#define set_bit(%1,%2)  (%1 |= (1 << (%2 & MAXCLIENTS-1)))
#define reset_bit(%1,%2)        (%1 &= ~(1 << (%2 & MAXCLIENTS-1)))

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

#define MAXCLIENTS 32
#define CLASSNAME "SnowEntity"
#define bg_num 4


new g_bAlive;
new 
g_iMaxPlayers;
new 
g_num[4];
new 
mg_sprite[4][] =
{
    
"sprites/bg_snow/bg.spr",
    
"sprites/bg_snow/bg_b.spr",
    
"sprites/bg_snow/bg_c.spr",
    
"sprites/bg_snow/bg_d_1.spr"
};

FVecIVec(Float:FVec[3], IVec[3])
{
    
IVec[0] = floatround(FVec[0], floatround_round);
    
IVec[1] = floatround(FVec[1], floatround_round);
    
IVec[2] = floatround(FVec[2], floatround_round);
    return 
1;
}

public 
plugin_init()
{
    
register_plugin("[BG] Snow 1.2""0.5""SHA[D]OW");
    
register_event("HLTV""Event_NewRound""a""1=0""2=0");
    new 
ent create_entity("info_target");
    
entity_set_string(ent0"SnowEntity");
    
entity_set_float(entEV_FL_nextthinkget_gametime() + 2.00);
    
register_think("SnowEntity""ThinkSnow");
    
RegisterHam(Ham_Spawn"player""Ham_PlayerSpawn_Post"1);
    
RegisterHam(Ham_Killed"player""HamPlayerKilled_Post"1);
    
g_iMaxPlayers get_maxplayers();
    return 
0;
}

public 
plugin_precache()
{
    new 
0;
    while (
4)
    {
        
g_num[i] = precache_model(mg_sprite[i][0][0]);
        
i++;
    }
    return 
0;
}

public 
Event_NewRound(id)
{
    
set_fog(random_num(0255), random_num(0255), random_num(0255));
    
set_lights("e");
    return 
0;
}

public 
Ham_PlayerSpawn_Post(id)
{
    if (
is_user_alive(id))
    {
        
g_bAlive << id 31 g_bAlive;
    }
    return 
0;
}

public 
HamPlayerKilled_Post(id)
{
    
g_bAlive = ~<< id 31 g_bAlive;
    return 
0;
}

public 
ThinkSnow(ent)
{
    
entity_set_float(entEV_FL_nextthinkget_gametime() + 0.10);
    static 
id;
    
id 1;
    while (
id <= g_iMaxPlayers)
    {
        new 
var2 g_bAlive;
        new 
var1;
        if (!
<< id 31 var2)
        {
            
var1 var2;
        }
        else
        {
            new 
Float:fOrigin[3];
            new 
iOrigin[3];
            
entity_get_vector(id0fOrigin);
            
FVecIVec(fOriginiOrigin);
            
iOrigin[0] = random_num(-10001000) + iOrigin[0];
            new 
var3 iOrigin[1];
            
var3 random_num(-10001000) + var3;
            new 
var4 iOrigin[2];
            
var4 random_num(200350) + var4;
            new 
var5 g_num;
            
UTIL_CreateSnow(iOriginvar5[random(4)][0][0], 114);
            
var1 var5;
        }
        
id += 1;
    }
    return 
0;
}

UTIL_CreateSnow(iOrigin[3], iSpriteIDiCountiLifeiScale)
{
    
message_begin(MSG_BROADCASTSVC_TEMPENTITY14000);
    
write_byte(15);
    
write_coord(iOrigin[0]);
    
write_coord(iOrigin[1]);
    
write_coord(iOrigin[2]);
    
write_coord(iOrigin[0]);
    
write_coord(iOrigin[1]);
    
write_coord(iOrigin[2]);
    
write_short(iSpriteID);
    
write_byte(iCount);
    
write_byte(iLife);
    
write_byte(iScale);
    
write_byte(random_num(15));
    
write_byte(random_num(13));
    
message_end();
    return 
0;
}

set_fog(redgreenblue)
{
    
message_begin(MSG_ALLget_user_msgid("Fog"), 14000);
    
write_byte(red);
    
write_byte(green);
    
write_byte(blue);
    
write_long(964891247);
    
message_end();
    return 
0;

Coding as if we were in 2006. lol.
__________________
eat1k is offline
Old 01-11-2019, 10:08
hamzashadow
This message has been deleted by hamzashadow.
Nutu_
AlliedModders Donor
Join Date: Mar 2016
Location: Germany
Old 01-11-2019 , 10:29   Re: Problem Complie ( HELP )
Reply With Quote #6

what's the problem with that plugin man? you dont know to compile or what?
__________________
a simple act of caring creates an endless ripple.
Nutu_ is offline
thEsp
BANNED
Join Date: Aug 2017
Old 01-11-2019 , 11:22   Re: Problem Complie ( HELP )
Reply With Quote #7

Literally most harsh thread I've ever seen. Congrats -_-
thEsp is offline
Old 01-14-2019, 10:26
hamzashadow
This message has been deleted by hamzashadow.
Old 01-16-2019, 11:42
hamzashadow
This message has been deleted by hamzashadow.
hamzashadow
Junior Member
Join Date: Jul 2018
Old 01-16-2019 , 11:47  
Reply With Quote #8

hamzashadow is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-19-2019 , 14:32   Re: Problem
Reply With Quote #9

hamzashadow, if you want help, make your post subject descriptive and include a statement about your specific problem in the post. "Problem" and then posting code gives no information for where to start so you will likely get little to no help.
__________________
Bugsy is offline
Reply


Thread Tools
Display Modes

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


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