viewing paste Unknown #14513 | SourcePawn

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
#include <sourcemod>
#include <sdktools>
 
public Plugin:myinfo =
{
    name = "VIP Plugin",
    author = "Wuja Franek",
    description = "VIP Plugin - free nades and shit",
    version = "0.1",
    url = "http://fyryny.net"
}
 
public OnPluginStart()
{
    HookEvent("player_spawn", Event_OnPlayerSpawn);
}
 
public Action:Event_OnPlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{
        new client = GetClientOfUserId(GetEventInt(event, "userid"));
 
        if(!IsPlayerAlive(client))
                return Plugin_Continue;
        else
        {
                if(!IsFakeClient(client) && (CheckCommandAccess(client, "admin_root", ADMFLAG_ROOT, false) || CheckCommandAccess(client, "admin_reservation", ADMFLAG_RESERVATION, false)))
                {
                        //PrintToChat(client, "\x01\x04 \x05Jestes VIPem lub Adminem :|");
                        GivePlayerItem(client, "weapon_hegrenade");
                        GivePlayerItem(client, "weapon_flashbang");
                        GivePlayerItem(client, "weapon_smokegrenade");
                        SetEntProp(client, Prop_Send, "m_bHasHelmet", 1);
                        SetEntProp(client, Prop_Send, "m_ArmorValue", 100);
                        if(GetClientTeam(client)==3)
                        {
                                new g_iDefuserOffset = FindSendPropOffs("CCSPlayer", "m_bHasDefuser");
                                SetEntData(client, g_iDefuserOffset, 1); // on/off
                        }
                }
        }
       
        return Plugin_Continue;
}
 
 
/////////////////////////////////////////////////////////////-------------------------------------------------------------------------------------////////////////////////////////////////////////////////////////////////
 
#include <sourcemod>  
 
new String:s_Cvar_ServerHostname[128], bool:g_Cvar_Hostname_Mode;
new Handle:h_Cvar_Hostname_Mode = INVALID_HANDLE;
new Handle:h_Cvar_ServerHostname = INVALID_HANDLE;
 
public Plugin:myinfo =
{
        name = "Autoexec Server Name",
        author = "Wuja Franek",
        description = "Exec Server name",
        version = SOURCEMOD_VERSION,
        url = "http://fyryny.net"
};
 
public OnPluginStart()
{
        h_Cvar_Hostname_Mode = CreateConVar("sm_hostname_mode", "0", "0 - Kwadrat / 1 - Gwiazdka.", 0, true, 0.0, true, 1.0);
        h_Cvar_ServerHostname = CreateConVar("sm_hostname", "Tutaj wpisz nazwe serwera");
       
        HookConVarChange(h_Cvar_ServerHostname, OnCVarChange);
        HookConVarChange(h_Cvar_Hostname_Mode, OnCVarChange);
}
 
public OnCVarChange(Handle:convar_hndl, const String:oldValue[], const String:newValue[])
{
        GetCVars();
}
 
GetCVars()
{
        GetConVarString(h_Cvar_ServerHostname, s_Cvar_ServerHostname, sizeof(s_Cvar_ServerHostname));
        g_Cvar_Hostname_Mode = GetConVarBool(h_Cvar_Hostname_Mode);
}
 
public OnMapStart()  
{
        if(g_Cvar_Hostname_Mode)
                ServerCommand("hostname ★ [PL] CSGaming.pl™ %s", s_Cvar_ServerHostname);
        else
                ServerCommand("hostname █ [PL] CSGaming.pl™ %s", s_Cvar_ServerHostname);
}  
Viewed 695 times, submitted by unknown.