FORUM.ALEXONE.RO - Ofera cele mai bune servere din ROMANIA de CS 1.6 si CS:GO CASUAL si COMPETITIVE 2007-2018

Comunitatea Alexone ofera servere de Counter Strike 1.6, PUBLIC si MIX/WAR 2007-2017 - Counter Strike Global Offensive PUBLIC, COMPETITIVE si MIX/WAR 2007-2018
It is currently May 5th, 2024, 10:00 am

All times are UTC+03:00




Post a reply
Username:
Subject:
Message body:
 

Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:
Font size:
Font colour
Options:
BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON
Disable BBCode
Disable smilies
Do not automatically parse URLs
Question
Cate litere are cuvantul "Alexone" ori 3 ?! (Se calculeaza):
This question is a means of preventing automated form submissions by spambots.
   
Upload attachment
If you wish to attach one or more files enter the details below.
Filename
File comment
 
   

Topic review - Ultimele harti jucate+timpul hartilor rulate
Author Message
  Post subject:  Re: Ultimele harti jucate+timpul hartilor rulate  Reply with quote
E bun .. !
Post Posted: December 30th, 2012, 6:27 pm
  Post subject:  Re: Ultimele harti jucate+timpul hartilor rulate  Reply with quote
Scrii /harti si iti apare ultimele harti jucate,acum eu nu l-am incercat.
Post Posted: December 15th, 2012, 9:55 am
  Post subject:  Re: Ultimele harti jucate+timpul hartilor rulate  Reply with quote
Ceva de gen`u ca scrii /maps si iti arata hartile anterioare, sau care inca nu au fost din cate am inteles ..
Post Posted: December 13th, 2012, 9:20 pm
  Post subject:  Re: Ultimele harti jucate+timpul hartilor rulate  Reply with quote
Si mai exact ce face pluginu asta?:)
Post Posted: December 12th, 2012, 8:27 pm
  Post subject:  Re: Ultimele harti jucate+timpul hartilor rulate  Reply with quote
Eu l-am primit,si am zis sa vad parerea voastra.Astept pareri? Daca e bun si daca e folositor.
Post Posted: December 12th, 2012, 5:41 pm
  Post subject:  Ultimele harti jucate+timpul hartilor rulate  Reply with quote
Cod:
]#include <amxmodx>
#include <amxmisc>
#include <colorchat>

#define LAST_MAPS_SAVE 5

new gSaveFile[64];
new gLastMapName[LAST_MAPS_SAVE][32];
new gLastMapTime[LAST_MAPS_SAVE];
new gNumLastMaps;

public plugin_init() {
register_plugin("Ultimele 5 Harti", "1.0", "cs.eforienett.ro");

register_clcmd("say /harti", "CmdLastMaps");

get_datadir(gSaveFile, charsmax(gSaveFile));
add(gSaveFile, charsmax(gSaveFile), "/ultimeleharti.txt");

new f = fopen(gSaveFile, "rt");

if(f) {
new line[64], minutes[12];

while(!feof(f) && gNumLastMaps < LAST_MAPS_SAVE) {
fgets(f, line, charsmax(line));
trim(line);

if(line[0]) {
parse(line, gLastMapName[gNumLastMaps], charsmax(gLastMapName[]), minutes, charsmax(minutes));
gLastMapTime[gNumLastMaps++] = str_to_num(minutes);
}
}

fclose(f);
}
}

public plugin_end() {
new minutes = floatround(get_gametime() / 60.0, floatround_ceil);

new map[32];
get_mapname(map, charsmax(map));

new f = fopen(gSaveFile, "wt");

fprintf(f, "^"%s^" %d", map, minutes);

if(gNumLastMaps == LAST_MAPS_SAVE) {
gNumLastMaps--;
}

for(new i = 0; i < gNumLastMaps; i++) {
fprintf(f, "^n^"%s^" %d", gLastMapName, gLastMapTime);
}

fclose(f);
}

public CmdLastMaps(id) {
if(gNumLastMaps) {
ColorChat(id, NORMAL, "^4*^1 Ultimele harti jucate sunt:");

new maps[192], len;
for(new i = 0; i < gNumLastMaps; i++) {
if(i && !(i % 3)) {
ColorChat(id, NORMAL, "^4*^1 %s", maps);
len = 0;
}

len += formatex(maps[len], charsmax(maps) - len, "%s%s (^4%d min^1)", len ¿ ", " : "", gLastMapName, gLastMapTime);
}

if(len) {
ColorChat(id, NORMAL, "^4*^1 %s", maps);
}
} else {
client_print(id, print_chat, "* Scuze, nu exista harti jucate in loguri.");
}
}


stock chat_color(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)

replace_all(msg, 190, "!g", "^4")
replace_all(msg, 190, "!y", "^1")
replace_all(msg, 190, "!team", "^3")
replace_all(msg, 190, "!team2", "^0")

if (id) players[0] = id; else get_players(players, count, "ch")
{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players)
write_byte(players);
write_string(msg);
message_end();
}
}
}
}

/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\ rtf1\ ansi\ deff0{\ fonttbl{\ f0\ fnil Tahoma;}}n\ viewkind4\ uc1\ pard\ lang1033\ f0\ fs16 n\ par }
*/
[/code]


colorchat.inc

Cod:
/* Fun functions
*
* by Numb
*
* This file is provided as is (no warranties).
*/

#if defined _colorchat_included
#endinput
#endif
#define _colorchat_included

enum Color
{
NORMAL = 1, // clients scr_concolor cvar color
GREEN, // Green Color
TEAM_COLOR, // Red, grey, blue
GREY, // grey
RED, // Red
BLUE, // Blue
}

new const TeamName[][] =
{
"",
"TERRORIST",
"CT",
"SPECTATOR"
}

ColorChat(id, Color:type, const msg[], any:...)
{
new message[256];

switch(type)
{
case NORMAL: // clients scr_concolor cvar color
{
message[0] = 0x01;
}
case GREEN: // Green
{
message[0] = 0x04;
}
default: // White, Red, Blue
{
message[0] = 0x03;
}
}

vformat(message[1], 251, msg, 4);

// Make sure message is not longer than 192 character. Will crash the server.
message[192] = '^0';

new team, ColorChange, index, MSG_Type;

if(id)
{
MSG_Type = MSG_ONE_UNRELIABLE;
index = id;
} else {
index = FindPlayer();
MSG_Type = MSG_BROADCAST;
}

team = get_user_team(index);
ColorChange = ColorSelection(index, MSG_Type, type);

ShowColorMessage(index, MSG_Type, message);

if(ColorChange)
{
Team_Info(index, MSG_Type, TeamName[team]);
}
}

ShowColorMessage(id, type, message[])
{
static msgSayText;
if(!msgSayText)
{
msgSayText = get_user_msgid("SayText");
}
message_begin(type, msgSayText, _, id);
write_byte(id)
write_string(message);
message_end();
}

Team_Info(id, type, team[])
{
static msgTeamInfo;
if(!msgTeamInfo)
{
msgTeamInfo = get_user_msgid("TeamInfo");
}
message_begin(type, msgTeamInfo, _, id);
write_byte(id);
write_string(team);
message_end();

return 1;
}

ColorSelection(index, type, Color:Type)
{
switch(Type)
{
case RED:
{
return Team_Info(index, type, TeamName[1]);
}
case BLUE:
{
return Team_Info(index, type, TeamName[2]);
}
case GREY:
{
return Team_Info(index, type, TeamName[0]);
}
}

return 0;
}

FindPlayer()
{
new i = -1;

while(i <= get_maxplayers())
{
if(is_user_connected(++i))
return i;
}

return -1;
}
Post Posted: December 12th, 2012, 5:39 pm

All times are UTC+03:00


Jump to:  
Powered by phpBB® Forum Software © phpBB Limited