Author Topic: Code  (Read 2598 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Code
« on: May 06, 2012, 04:27:34 PM »
Treba mi code za sourcemod kada neki igrac ude da mu pise poruka , ne plugin nego code

Offline
*****
Re: Code
« Reply #1 on: May 06, 2012, 08:06:09 PM »
Hm zašto ?. imaš 2 plugina welcome message, uzmi njihov kod ako već hoćeš ;).

Prvi
Drugi

EDIT: ili ako hoćeš pojednostavljeni evo ti, malo sam zahrđao potom što nisam dugo radio plugin.
Code: [Select]
#include <sourcemod>
#include <sdktools>
#define PLUGIN_VERSION "1.0"
public Plugin:myinfo =
{
    name = "Welcome Message",
    author = "Pijanista [CRO]",
    description = "ništa posebno",
    version = PLUGIN_VERSION,
    url = "http://rebirthofbalkan.com"
};

public OnPluginStart()
{
HookEvent("round_start", GameStart);

}
new WelcomeMessage = 1; // Change to 0 to disable welcome message (Not Recommended)
new RoundMessage = 1; // Change to 0 to disable reminder messages each round

public OnClientPostAdminCheck(client)
{
if (WelcomeMessage == 1)
{
PrintToChat(client, "\x03 TEXT Linija 1 \x03");
PrintToChat(client, "\x03 TEXT LINIJA 2 \x03");
}
}
public Action:GameStart(Handle:Event, const String:Name[], bool:Broadcast)
{
if (RoundMessage == 1)
{
PrintToChatAll("\x03 TEXT SVAKE RUNDE \x03");
}
}

Ako ćeš ovo koristiti, molio bi te da nemičeš ovo.
Code: [Select]
#include <sourcemod>
#include <sdktools>
#define PLUGIN_VERSION "1.0"
public Plugin:myinfo =
{
    name = "Welcome Message",
    author = "Pijanista [CRO]",
    description = "ništa posebno",
    version = PLUGIN_VERSION,
    url = "http://rebirthofbalkan.com"
};
« Last Edit: May 06, 2012, 08:13:01 PM by matacro »


I was born intelligent, education ruined me.


Offline
*
Re: Code
« Reply #2 on: May 06, 2012, 08:34:33 PM »
Meni treba code radim jedan plugin pa neznam treba mi code za kada se ude da prikaze poruku

Offline
*****
Re: Code
« Reply #3 on: May 06, 2012, 08:38:00 PM »
kako radiš plugin, ako neznaš sam to napraviti ?, code imaš gore.


I was born intelligent, education ruined me.


Offline
*****
Re: Code
« Reply #4 on: May 06, 2012, 09:23:23 PM »
Code: [Select]
#pragma semicolon 1

#include <sourcemod>
#include <sdktools>

#define PLUGIN_VERSION "3.0.0"

public Plugin:myinfo = {
 name        = "Stop Spamming Commands",
 author      = "antrax_RTF",
 description = "Block Spamming Commands",
 version     = PLUGIN_VERSION,
 url         = "itd"
};

new lastUsedTime[MAXPLAYERS + 1];

public OnPluginStart() {
 RegConsoleCmd("status", Command_Status);
 RegConsoleCmd("ping", Command_Status);
 RegConsoleCmd("heartbeat", Command_Status);
 RegConsoleCmd("groundlist", Command_Status);
 RegConsoleCmd("es_version", Command_Status);
 HookEvent("round_start", GameStart);
}
new WelcomeMessage = 1; // Change to 0 to disable welcome message (Not Recommended)
new RoundMessage = 1; // Change to 0 to disable reminder messages each round


public Action:Command_Status(client, args) {
 if(lastUsedTime[client] > GetTime() - 10) {
  return Plugin_Handled;
 }
 lastUsedTime[client] = GetTime();
 return Plugin_Continue;
}
public OnClientPostAdminCheck(client)
{
if (WelcomeMessage == 1)
{
PrintToChat(client, "\x03 TEXT Linija 1 \x03");
PrintToChat(client, "\x03 TEXT LINIJA 2 \x03");
}
}
public Action:GameStart(Handle:Event, const String:Name[], bool:Broadcast)
{
if (RoundMessage == 1)
{
PrintToChatAll("\x03 TEXT SVAKE RUNDE \x03");
}
}
« Last Edit: May 06, 2012, 09:33:06 PM by matacro »


I was born intelligent, education ruined me.