User
Pass
2FA
 
 

cerere modificare plugin

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Resources
Author Message3125
DiaNNa ;x

[Mentally Stable]



Status: Offline
(since 28-02-2011 20:24)
Joined: 31 Mar 2009
Posts: 98, Topics: 16
Location: Romania

Reputation: 239.8
Votes: 4

Post Posted: 13-03-2010, 15:35:01 | Translate post to: ... (Click for more languages)

As vrea si eu sa modific pluginu acesta,sa dea mesaje colorate,cum fac sa introduc culori ^x03 ^x04 ^x01

#include <amxmisc>
#include <cstrike>
#include <fun>

#define adtime 600.0 //Default of 10 minuites

new pcvar_Advertise
new pcvar_Display

public plugin_init()
{
register_plugin("Reset Score", "1.0", "didi")

//You may type /resetscore or /retry
register_clcmd("say /resetscore", "reset_score")
register_clcmd("say /retry", "reset_score")

//This command by default will be set at 0
//Change it to 1 in server.cfg if you want
//A message to be shown to advertise this.
pcvar_Advertise = register_cvar("sv_rsadvertise", "0")
//This command by default is also 0
//Change it to 1 in server.cfg if you want
//It to show who reset their scores when they do it
pcvar_Display = register_cvar("sv_rsdisplay", "0")

if(get_cvar_num("sv_rsadvertise") == 1)
{
set_task(adtime, "advertise", _, _, _, "b")
}
}

public reset_score(id)
{
//These both NEED to be done twice, otherwise your frags wont
//until the next round
cs_set_user_deaths(id, 0)
set_user_frags(id, 0)
cs_set_user_deaths(id, 0)
set_user_frags(id, 0)

if(get_pcvar_num(pcvar_Display) == 1)
{
new name[33]
get_user_name(id, name, 32)
client_print(0, print_chat, "%s [FirSt]Ti-ai resetat scorul", name)
}
else
{
client_print(id, print_chat, "[FirSt]Ti-ai resetat scorul!")
}
}

public advertise()
{
set_hudmessage(255, 0, 0, -1.0, 0.20, 0, 0.2, 12.0)
show_hudmessage(0, "Tasteaza /resetscore sau /retry si ai scorul 0")
}

public client_putinserver(id)
{
if(get_pcvar_num(pcvar_Advertise) == 1)
{
set_task(10.0, "connectmessage", id, _, _, "a", 1)
}
}

public connectmessage(id)

0 0
  
Back to top
View user's profile Send private message
Tr3z3gu3T

[Mentally Stable]



Status: Offline
(since 12-06-2019 13:16)
Joined: 29 Sep 2006
Posts: 493, Topics: 71
Location: Romania

Reputation: 481.6
Votes: 14

 
Post Posted: 13-03-2010, 15:44:15 | Translate post to: ... (Click for more languages)

Code:

public advertise()
{
set_hudmessage(255, 0, 0, -1.0, 0.20, 0, 0.2, 12.0)
show_hudmessage(0, "Tasteaza /resetscore sau /retry si ai scorul 0")
}


folosesti codul RGB al culorilor si in functia de mai sus inlocuiesti 255, 0, 0, cu codul tau.

http://www.tayloredmktg.com/rgb/ - ai aici codurile culorilor

Exemplu pt Galben:

Code:

public advertise()
{
set_hudmessage(255, 255, 0, -1.0, 0.20, 0, 0.2, 12.0)
show_hudmessage(0, "Tasteaza /resetscore sau /retry si ai scorul 0")
}


nu sunt singur de rezultat insa poti testa @ http://amx.freakz.ro/

0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
DiaNNa ;x

[Mentally Stable]



Status: Offline
(since 28-02-2011 20:24)
Joined: 31 Mar 2009
Posts: 98, Topics: 16
Location: Romania

Reputation: 239.8
Votes: 4

Post Posted: 13-03-2010, 16:04:20 | Translate post to: ... (Click for more languages)

Eu de fapt vroiam
public advertise()
{
set_hudmessage(255, 255, 0, -1.0, 0.20, 0, 0.2, 12.0)
show_hudmessage(0, "Tasteaza /resetscore sau /retry si ai scorul 0")
}

sa arate "tasteaza" cu o culoare
"resetscore" cu alta....

0 0
  
Back to top
View user's profile Send private message
Tr3z3gu3T

[Mentally Stable]



Status: Offline
(since 12-06-2019 13:16)
Joined: 29 Sep 2006
Posts: 493, Topics: 71
Location: Romania

Reputation: 481.6
Votes: 14

 
Post Posted: 13-03-2010, 22:00:06 | Translate post to: ... (Click for more languages)

nu asta s-a inteles din primul post...
0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
DiaNNa ;x

[Mentally Stable]



Status: Offline
(since 28-02-2011 20:24)
Joined: 31 Mar 2009
Posts: 98, Topics: 16
Location: Romania

Reputation: 239.8
Votes: 4

Post Posted: 13-03-2010, 22:59:34 | Translate post to: ... (Click for more languages)

"sa dea mesaje colorate,cum fac sa introduc culori ^x03 ^x04 ^x01"

la tine nu vad ^x03 ^x04 deci am precizat cat de cat corect

0 0
  
Back to top
View user's profile Send private message
nr913
[Banned user]


Banned


Status: Offline
(since 24-10-2013 10:06)
Joined: 24 Apr 2009
Posts: 4224, Topics: 223
Location: România

Reputation: 60.3
Votes: 156

 
Post Posted: 14-03-2010, 17:28:30 | Translate post to: ... (Click for more languages)

El nu vrea in HUD, el vrea in chat.
Diamandaavon, faci o noua functie
Code:

colorat(id,message[])
{
    new seyText=get_user_msgid("SayText");
    message_begin(id,MSG_ONE,{0,0,0},id);
    write_byte(id);
    write_string(message);
    message_end();
}

pe care o folosesti astfel:
Code:

colorat(player,"^x01Acesta ^x03este ^x01un ^x04mesaj ^x01colorat.");


Attitude - A little thing that makes a BIG difference
0 0
  
Back to top
View user's profile Send private message
DiaNNa ;x

[Mentally Stable]



Status: Offline
(since 28-02-2011 20:24)
Joined: 31 Mar 2009
Posts: 98, Topics: 16
Location: Romania

Reputation: 239.8
Votes: 4

Post Posted: 14-03-2010, 20:14:02 | Translate post to: ... (Click for more languages)

daca ai putea sa mi-l dai in context,adica sa postezi editat sma te rog
0 0
  
Back to top
View user's profile Send private message
nr913
[Banned user]


Banned


Status: Offline
(since 24-10-2013 10:06)
Joined: 24 Apr 2009
Posts: 4224, Topics: 223
Location: România

Reputation: 60.3
Votes: 156

 
Post Posted: 15-03-2010, 17:18:06 | Translate post to: ... (Click for more languages)

Functia o pui jos de tot, la sfarsitul pluginului. O apelezi unde vrei cu colorat(player,mesaj);

Attitude - A little thing that makes a BIG difference
0 0
  
Back to top
View user's profile Send private message
DiaNNa ;x

[Mentally Stable]



Status: Offline
(since 28-02-2011 20:24)
Joined: 31 Mar 2009
Posts: 98, Topics: 16
Location: Romania

Reputation: 239.8
Votes: 4

Post Posted: 15-03-2010, 18:12:52 | Translate post to: ... (Click for more languages)

da erori la compilare

resetscore.sma(70) : error 017: undefined symbol "colorat"
resetscore.sma(73) : error 021: symbol already defined: "message_begin"
resetscore.sma(77) : warning 203: symbol is never used: "seyText"

0 0
  
Back to top
View user's profile Send private message
nr913
[Banned user]


Banned


Status: Offline
(since 24-10-2013 10:06)
Joined: 24 Apr 2009
Posts: 4224, Topics: 223
Location: România

Reputation: 60.3
Votes: 156

 
Post Posted: 15-03-2010, 19:17:33 | Translate post to: ... (Click for more languages)

Poti arata si ce ai realizat cu copy/paste-ul ala? Sigur nu ai facut cum trebuie.

Attitude - A little thing that makes a BIG difference
0 0
  
Back to top
View user's profile Send private message
DiaNNa ;x

[Mentally Stable]



Status: Offline
(since 28-02-2011 20:24)
Joined: 31 Mar 2009
Posts: 98, Topics: 16
Location: Romania

Reputation: 239.8
Votes: 4

Post Posted: 15-03-2010, 21:01:36 | Translate post to: ... (Click for more languages)

am gasit alta varianta - ms oricum -
0 0
  
Back to top
View user's profile Send private message
nr913
[Banned user]


Banned


Status: Offline
(since 24-10-2013 10:06)
Joined: 24 Apr 2009
Posts: 4224, Topics: 223
Location: România

Reputation: 60.3
Votes: 156

 
Post Posted: 15-03-2010, 22:05:23 | Translate post to: ... (Click for more languages)

Cand vedeti ca nu va iese lasati totul balta si cautati altceva. Asta e.

Attitude - A little thing that makes a BIG difference
0 0
  
Back to top
View user's profile Send private message
DiaNNa ;x

[Mentally Stable]



Status: Offline
(since 28-02-2011 20:24)
Joined: 31 Mar 2009
Posts: 98, Topics: 16
Location: Romania

Reputation: 239.8
Votes: 4

Post Posted: 15-03-2010, 22:26:45 | Translate post to: ... (Click for more languages)

cautam ceva de genu
/* 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;
}

0 0
  
Back to top
View user's profile Send private message
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Resources  


The time now is 19-04-2024, 22:29:38
Copyright info

Based on phpBB ro/com
B

 
 
 







I forgot my password


This message appears only once, so
like us now until it's too late ! :D
x