AlliedModders

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

hamzashadow 01-10-2019 18:50

Problem
 
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;



CrazY. 01-10-2019 18:57

Re: Problem Complie ( HELP )
 
And?

JocAnis 01-10-2019 20:17

Re: Problem Complie ( HELP )
 
Why?

fysiks 01-10-2019 23:11

Re: Problem Complie ( HELP )
 
Quote:

Originally Posted by hamzashadow (Post 2634085)
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.

eat1k 01-11-2019 01:30

Re: Problem Complie ( HELP )
 
Quote:

Originally Posted by hamzashadow (Post 2634078)
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.

Nutu_ 01-11-2019 10:29

Re: Problem Complie ( HELP )
 
what's the problem with that plugin man? you dont know to compile or what?

thEsp 01-11-2019 11:22

Re: Problem Complie ( HELP )
 
Literally most harsh thread I've ever seen. Congrats -_-

hamzashadow 01-16-2019 11:47

http://cs-devil.ru/_ld/13/69066679.jpg

Bugsy 01-19-2019 14:32

Re: Problem
 
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.


All times are GMT -4. The time now is 07:38.

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