This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

edit plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
redxxx
Member
Join Date: Mar 2015
Old 10-12-2015 , 08:51   edit plugin
Reply With Quote #1

Quote:
Code:
#include <sourcemod>
#include "include/retakes.inc"
#include "retakes/generic.sp"

#pragma semicolon 1
#pragma newdecls required

public Plugin myinfo = {
    name = "CS:GO Retakes: site picker",
    author = "splewis",
    description = "Adds admin commands to pick the bombsite being used",
    version = PLUGIN_VERSION,
    url = "https://github.com/splewis/csgo-retakes"
};

bool g_forceSite;
Bombsite g_pickedSite;

public void OnPluginStart() {
    g_forceSite = false;
    RegAdminCmd("sm_site", Command_Site, ADMFLAG_CHANGEMAP);
}

public Action Command_Site(int client, int args) {
    char arg[32];
    if (args >= 1 && GetCmdArg(1, arg, sizeof(arg))) {
        if (StrEqual(arg, "a", false)) {
            g_forceSite = true;
            g_pickedSite = BombsiteA;
            Retakes_MessageToAll("Now only using bombsite A");
        } else  if (StrEqual(arg, "b", false)) {
            g_forceSite = true;
            g_pickedSite = BombsiteB;
            Retakes_MessageToAll("Now only using bombsite B");
        } else {
            g_forceSite = false;
            Retakes_MessageToAll("Now using all bombsites");
        }
    } else {
        Retakes_Message(client, "Usage: sm_site [a|b|any]");
    }
}

public void Retakes_OnSitePicked(Bombsite& site) {
    if (g_forceSite) {
        site = g_pickedSite;
    }
}
i want to print message on hint message(alert) on
like here
__________________

CSGO.MEVID.RO

Last edited by redxxx; 10-12-2015 at 08:51.
redxxx is offline
Send a message via Yahoo to redxxx
ThatOneGuy
Veteran Member
Join Date: Jul 2012
Location: Oregon, USA
Old 10-12-2015 , 23:21   Re: edit plugin
Reply With Quote #2

Code:
	for(new i = 1; i <= MaxClients; i++)
	{
		if(IsClientInGame(i))
		{
			PrintHintText(i, "Retake bombite B");
		}
	}
__________________

Last edited by ThatOneGuy; 10-12-2015 at 23:21.
ThatOneGuy is offline
Reply



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 16:12.


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