AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   no need for this (https://forums.alliedmods.net/showthread.php?t=316652)

AlexFlaviu 06-03-2019 05:36

no need for this
 
no need for this

Dragokas 06-03-2019 09:20

Re: Start Round Effect for CSS
 
something like:

PHP Code:

#define PLUGIN_VERSION "1.0"

#pragma semicolon 1
#pragma newdecls required

#include <sourcemod>

UserMsg g_FadeUserMsgId;

public 
APLRes AskPluginLoad2(Handle myselfbool latechar[] errorint err_max)
{
    
g_FadeUserMsgId GetUserMessageId("Fade");
    if (
g_FadeUserMsgId == INVALID_MESSAGE_ID) {
        
strcopy(errorerr_max"Cannot find Fade user message ID.");
        return 
APLRes_SilentFailure;
    }
    return 
APLRes_Success;
}

public 
void OnPluginStart()
{
    
HookEvent("round_start",             Event_RoundStart,    EventHookMode_PostNoCopy);
}

public 
void Event_RoundStart(Event eventchar[] namebool dontBroadcast)
{
    for (
int i 1<= MaxClientsi++)
        if (
IsClientInGame(i) && !IsFakeClient(i))
            
BlindClient(i128);
}

stock void BlindClient(int targetint amount)
{
    
int targets[2];
    
targets[0] = target;
    
    
int holdtime;
    
int duration 0;

    
int flags;
    if (
amount == 0)
    {
        
flags = (0x0001 0x0010);
        
holdtime 10000;
    }
    else
    {
        
flags = (0x0002 0x0008);
        
holdtime 10;
    }
    
    
int color[4] = { 000};
    
color[3] = amount// 255 for the full blind
    
    
Handle message StartMessageEx(g_FadeUserMsgIdtargets1);
    if (
GetUserMessageType() == UM_Protobuf)
    {
        
Protobuf pb UserMessageToProtobuf(message);
        
pb.SetInt("duration"duration);
        
pb.SetInt("hold_time"holdtime);
        
pb.SetInt("flags"flags);
        
pb.SetColor("clr"color);
    }
    else
    {
        
BfWrite bf UserMessageToBfWrite(message);
        
bf.WriteShort(duration);
        
bf.WriteShort(holdtime);
        
bf.WriteShort(flags);
        
bf.WriteByte(color[0]);
        
bf.WriteByte(color[1]);
        
bf.WriteByte(color[2]);
        
bf.WriteByte(color[3]);
    }
    
EndMessage();



Dragokas 08-17-2023 09:28

Re: Start Round Effect for CSS
 
https://www.sourcemod.net/plugins.ph...tion=&search=1


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

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