Plugin sıkıntısı
Moderatör: Moderatörler
-
Xander
Konu Sahibi - Mesajlar: 1617
- Kayıt: Pzt Kas 28, 2016 9:24 pm
- Konum: Istanbul
- Server Ip/DNS: csxx.csduragi.com
- Clan İsmi: xx - נв
- İletişim:
-
PaZee
- Mesajlar: 1762
- Kayıt: Çrş Şub 22, 2017 11:28 pm
- Konum: Istanbul
- Server Ip/DNS: Cs.teknoklan.com
- Clan İsmi: TeknoKlan
- İletişim:
-
Xander
Konu Sahibi - Mesajlar: 1617
- Kayıt: Pzt Kas 28, 2016 9:24 pm
- Konum: Istanbul
- Server Ip/DNS: csxx.csduragi.com
- Clan İsmi: xx - נв
- İletişim:
Plugin sıkıntısı
@PaZee oyle degil benim attıgım .smayı yeni surume uyumlarmısın demek istedim
| Link: | |
| Linklerini gizle |
-
PaZee
- Mesajlar: 1762
- Kayıt: Çrş Şub 22, 2017 11:28 pm
- Konum: Istanbul
- Server Ip/DNS: Cs.teknoklan.com
- Clan İsmi: TeknoKlan
- İletişim:
Plugin sıkıntısı
zemzemde colorchat hatasi vardi.
herhalde eror alipta yukledin.
oyle acilmaz.
yaptigim seyi burda anlatiyor
eklenti-istekleri/colorchat-hatasi-vide ... -t142.html
herhalde eror alipta yukledin.
oyle acilmaz.
yaptigim seyi burda anlatiyor
eklenti-istekleri/colorchat-hatasi-vide ... -t142.html
Kod: Tümünü seç
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#define VERSION "2.1"
enum Color
{
NORMAL = 1, // clients scr_concolor cvar color
GREEN, // Green Color
TEAM_COLOR, // Red, grey, blue
GREY, // grey
RED, // Red
BLUE, // Blue
}
new TeamName[][] =
{
"",
"TERRORIST",
"CT",
"SPECTATOR"
}
ColorChat(id, Color:type, const msg[], {Float,Sql,Result,_}:...)
{
static 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';
static team, ColorChange, index, MSG_Type;
if(id)
{
MSG_Type = MSG_ONE;
index = id;
} else {
index = FindPlayer();
MSG_Type = MSG_ALL;
}
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[])
{
message_begin(type, get_user_msgid("SayText"), _, id);
write_byte(id)
write_string(message);
message_end();
}
Team_Info(id, type, team[])
{
message_begin(type, get_user_msgid("TeamInfo"), _, 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()
{
static i;
i = -1;
while(i <= get_maxplayers())
{
if(is_user_connected(++i))
{
return i;
}
}
return -1;
}
new bool:has_rb[33]
new cost_cvar, lasts_cvar, speed_cvar
public plugin_init()
{
register_plugin("Zemzem",VERSION,"Shadow `")
register_clcmd("say /zemzem","say_cmd_handle")
cost_cvar = register_cvar("RB_Cost","0")
lasts_cvar = register_cvar("RB_Lasts","20.0")
speed_cvar = register_cvar("RB_Speed","650.0")
register_event("CurWeapon","curweap","be")
}
public curweap(id)
{
if(is_user_alive(id) && has_rb[id])
{
client_cmd(id,"cl_forwardspeed 400;cl_backspeed 400;cl_sidespeed 400")
set_user_maxspeed(id,get_pcvar_float(speed_cvar))
}
}
public client_connect(id) has_rb[id]=false
public client_disconnect(id) has_rb[id]=false
public say_cmd_handle(id)
{
if(!is_user_alive(id))
{
ColorChat(id,GREEN,"^1[ ^4IMPARATOR # F-TIPI JAILBREAK ^1] ^4Zemzem ^1alamazsiniz, cunku olusunuz...")
}
else if(has_rb[id])
{
ColorChat(id,GREEN,"^1[ ^4IMPARATOR # F-TIPI JAILBREAK ^1] ^1Zaten ^4Zemzem^1'iniz var.")
}
else if(cs_get_user_money(id)<get_pcvar_num(cost_cvar))
{
ColorChat(id,GREEN,"^1[ ^4IMPARATOR # F-TIPI JAILBREAK ^1] ^4Zemzem ^1almak icin yeteri kadar paraniz yok...")
}
else
{
cs_set_user_money(id,cs_get_user_money(id) - get_pcvar_num(cost_cvar),1)
has_rb[id]=true
set_task(get_pcvar_float(lasts_cvar),"redbull_over",id)
set_task(1.0,"plus_hp",id,"",0,"b")
set_user_gravity(id,0.5)
set_user_maxspeed(id,get_pcvar_float(speed_cvar))
ColorChat(id,GREEN,"^1[ ^4IMPARATOR # F-TIPI JAILBREAK ^1] ^4Zemzem ^1kanatlandirir...")
ColorChat(id,GREEN,"^1[ ^4IMPARATOR # F-TIPI JAILBREAK ^1] ^4Zemzem ^1sinirlerini yatistirir, ozellikle stresli ve gergin aninda...")
}
}
public plus_hp(id)
{
if(has_rb[id]) set_user_health(id,get_user_health(id)+1)
}
public redbull_over(id)
{
if(is_user_connected(id))
{
has_rb[id]=false
ColorChat(id,GREEN,"^1[ ^4IMPARATOR # F-TIPI JAILBREAK ^1] ^4Zemzem ^1suren sona erdi...")
set_user_gravity(id,1.0)
set_user_maxspeed(id,320.0)
set_user_gravity(id,1.0)
remove_task(id)
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1055\\ f0\\ fs16 \n\\ par }
*/
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1055\\ f0\\ fs16 \n\\ par }
*/
| Link: | |
| Linklerini gizle |
-
Xander
Konu Sahibi - Mesajlar: 1617
- Kayıt: Pzt Kas 28, 2016 9:24 pm
- Konum: Istanbul
- Server Ip/DNS: csxx.csduragi.com
- Clan İsmi: xx - נв
- İletişim:
Plugin sıkıntısı
@PaZee bu arada zemzem vs. calısmıyor ama hook vs. calısıyor eski surumden
| Link: | |
| Linklerini gizle |
-
PaZee
- Mesajlar: 1762
- Kayıt: Çrş Şub 22, 2017 11:28 pm
- Konum: Istanbul
- Server Ip/DNS: Cs.teknoklan.com
- Clan İsmi: TeknoKlan
- İletişim:
-
Xander
Konu Sahibi - Mesajlar: 1617
- Kayıt: Pzt Kas 28, 2016 9:24 pm
- Konum: Istanbul
- Server Ip/DNS: csxx.csduragi.com
- Clan İsmi: xx - נв
- İletişim:
Plugin sıkıntısı
@PaZee verdiginde zaten hata veriyor ama hata verincede calısıyordu bu
| Link: | |
| Linklerini gizle |
-
Xander
Konu Sahibi - Mesajlar: 1617
- Kayıt: Pzt Kas 28, 2016 9:24 pm
- Konum: Istanbul
- Server Ip/DNS: csxx.csduragi.com
- Clan İsmi: xx - נв
- İletişim:
-
dozean
- Mesajlar: 847
- Kayıt: Pzr Şub 05, 2017 12:54 am
- Server Ip/DNS: 213.238.173.48
- Clan İsmi: Ayyildiz Tim
Plugin sıkıntısı
@PaZee
colorchat uyarladım fakat şu hatayı aldım.
Kod: Tümünü seç
/*
* _______ _ _ __ __
* | _____/ | | | | \ \ __ / /
* | | | | | | | | / \ | |
* | | | |____| | | |/ __ \| |
* | | ___ | ______ | | / \ |
* | | |_ | | | | | | / \ |
* | | | | | | | | | | | |
* | |____| | | | | | | | | |
* |_______/ |_| |_| \_/ \_/
*
*
*
* Last Edited: 12-31-07
*
* ============
* Changelog:
* ============
*
* v2.0
* -Added ML
* -Optimized Code
*
* v1.0
* -Initial Release
*
*/
#define VERSION "2.0"
enum Color
{
NORMAL = 1, // clients scr_concolor cvar color
GREEN, // Green Color
TEAM_COLOR, // Red, grey, blue
GREY, // grey
RED, // Red
BLUE, // Blue
}
new TeamName[][] =
{
"",
"TERRORIST",
"CT",
"SPECTATOR"
}
ColorChat(id, Color:type, const msg[], {Float,Sql,Result,_}:...)
{
static 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';
static team, ColorChange, index, MSG_Type;
if(id)
{
MSG_Type = MSG_ONE;
index = id;
} else {
index = FindPlayer();
MSG_Type = MSG_ALL;
}
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[])
{
message_begin(type, get_user_msgid("SayText"), _, id);
write_byte(id)
write_string(message);
message_end();
}
Team_Info(id, type, team[])
{
message_begin(type, get_user_msgid("TeamInfo"), _, 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()
{
static i;
i = -1;
while(i <= get_maxplayers())
{
if(is_user_connected(++i))
{
return i;
}
}
return -1;
}
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#include <jail>
new bool:has_rb[33], bool:auto[33]
new cost_cvar, lasts_cvar, speed_cvar
new map[32]
public plugin_init()
{
get_mapname(map,31);
if((containi(map,"jail") == -1) && (containi(map,"jb_") == -1)) return
register_plugin("ZemZem",VERSION,"GHW_Chronic")
register_clcmd("say /zemzem","say_cmd_handle")
cost_cvar = register_cvar("zemzem_verecek","1")
lasts_cvar = register_cvar("RB_Lasts","21.0")
speed_cvar = register_cvar("RB_Speed","900.0")
register_event("CurWeapon","curweap","be")
register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
}
public event_round_start()
{
new players[32],inum;
static Uid;
get_players(players,inum)
for(new i;i<inum;i++) {
Uid = players[i]
auto[Uid] = true
}
}
public curweap(id)
{
if(is_user_alive(id) && has_rb[id])
{
client_cmd(id,"cl_forwardspeed 400;cl_backspeed 400;cl_sidespeed 400")
set_user_maxspeed(id,get_pcvar_float(speed_cvar))
}
}
public client_connect(id) has_rb[id]=false
public client_disconnected(id) has_rb[id]=false
public say_cmd_handle(id)
{
if(!is_user_alive(id))
{
client_printc(id,"!t[ !gIMPARATOR # F-TIPI JAILBREAK !t] !n El Fatiha! Olmusler Zemzem icemez.")
}
else if(has_rb[id])
{
client_printc(id,"!t[ !gIMPARATOR # F-TIPI JAILBREAK !t] !n Zemzem zaten icmissin amacin ney imammi olacaksin!")
}
else
{
new contador=0;
new players[32], num, tempid;
get_players(players, num)
for (new i=0; i<num; i++)
{
tempid = players[i]
if (get_user_team(tempid)==1 && is_user_alive(tempid))
{
contador++;
}
}
if ( contador == 1 )
{
client_printc(id,"!t[ !gIMPARATOR # F-TIPI JAILBREAK !t] !n Mahkumlar 1 kisiyse redbull basamaz!")
zemzem_over(id)
}
else if ( contador >= 2 )
{
jb_set_user_packs(id,jb_get_user_packs(id) + get_pcvar_num(cost_cvar))
has_rb[id]=true
set_task(get_pcvar_float(lasts_cvar),"zemzem_over",id)
set_user_gravity(id,0.5)
set_user_maxspeed(id,get_pcvar_float(speed_cvar))
client_printc(id,"!t[ !gIMPARATOR # F-TIPI JAILBREAK !t] !n Zemzem sinirlerini yatistirir, ozellikle stresli ve gergin aninda...")
}
}
}
public zemzem_over(id)
{
if(is_user_connected(id))
{
has_rb[id]=false
if(is_user_alive(id)){
client_printc(id,"!t[ !gIMPARATOR # F-TIPI JAILBREAK !t] !nRedbull'un bitti :/")
}
set_user_gravity(id,1.0)
set_user_maxspeed(id,250.0)
set_user_gravity(id,1.0)
remove_task(id)
}
}
stock client_printc(const id, const input[], any:...)
{
new count = 1, players[32];
static msg[191];
vformat(msg, 190, input, 3);
replace_all(msg, 190, "!n", "^x01");
replace_all(msg, 190, "!g", "^x04");
replace_all(msg, 190, "!t", "^x03");
if (id) players[0] = id; else get_players(players, count, "ch"); {
for (new i = 0; i < count; i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
return PLUGIN_CONTINUE
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1055\\ f0\\ fs16 \n\\ par }
*/Kod: Tümünü seç
//cstrike/addons/amxmodx/scripting/red1.sma(52) : warning 203: symbol is never used: "ColorChat"
//cstrike/addons/amxmodx/scripting/red1.sma(89) : warning 203: symbol is never used: "ColorSelection"
//cstrike/addons/amxmodx/scripting/red1.sma(84) : warning 203: symbol is never used: "FindPlayer"
//cstrike/addons/amxmodx/scripting/red1.sma(91) : warning 203: symbol is never used: "ShowColorMessage"
//cstrike/addons/amxmodx/scripting/red1.sma(95) : warning 203: symbol is never used: "Team_Info"| Link: | |
| Linklerini gizle |
-
PaZee
- Mesajlar: 1762
- Kayıt: Çrş Şub 22, 2017 11:28 pm
- Konum: Istanbul
- Server Ip/DNS: Cs.teknoklan.com
- Clan İsmi: TeknoKlan
- İletişim:
Plugin sıkıntısı
dozen sana attigimda gerek yok 
cunki colorchat kullanilmamis.
cunki colorchat kullanilmamis.
| Link: | |
| Linklerini gizle |