1. sayfa (Toplam 2 sayfa)

sma düzenleme

Gönderilme zamanı: Cum May 12, 2017 11:54 pm
gönderen MehmetReis-
sa arkadaşlar şu smayı düzenlermisiniz color chat hatası verdi sanırım

Kod: Tümünü seç

/* 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 TeamName[][] = 
{
	"",
	"TERRORIST",
	"CT",
	"SPECTATOR"
}

ColorChat(id, Color:type, const msg[], {Float,Sql,Result,_}:...)
{
	if( !get_playersnum() ) return;
	
	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;
		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[])
{
	static bool:saytext_used;
	static get_user_msgid_saytext;
	if(!saytext_used)
	{
		get_user_msgid_saytext = get_user_msgid("SayText");
		saytext_used = true;
	}
	message_begin(type, get_user_msgid_saytext, _, id);
	write_byte(id)		
	write_string(message);
	message_end();	
}

Team_Info(id, type, team[])
{
	static bool:teaminfo_used;
	static get_user_msgid_teaminfo;
	if(!teaminfo_used)
	{
		get_user_msgid_teaminfo = get_user_msgid("TeamInfo");
		teaminfo_used = true;
	}
	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()
{
	new i = -1;

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

	return -1;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/
yazdım fakat düzelmedi siz düzeltirmisiniz birde bu ne hatası söylermisiniz ?

sma düzenleme

Gönderilme zamanı: Cum May 12, 2017 11:56 pm
gönderen MRX3565
Bunlar warning, yani kullanabilirsin.

sma düzenleme

Gönderilme zamanı: Cmt May 13, 2017 12:09 am
gönderen MehmetReis-
MRX3565 yazdı:Bunlar warning, yani kullanabilirsin.
özele bakarmısın furienle ilgili yazmıştım D:

sma düzenleme

Gönderilme zamanı: Cmt May 13, 2017 12:10 am
gönderen TunnS[C]
Cholor chat hatası vermesı sacma plugınde cholorchat kullanılmamıs.

Kod: Tümünü seç

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Sahip Girisi"
#define VERSION "1.0"
#define AUTHOR "MuhammeDesigN"

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
}

public client_putinserver(id)
{
if(get_user_flags(id) & ADMIN_RCON)
{
set_task(70.0, "adminconnect", id)
}
}

public adminconnect(id)
{
new name[32]
get_user_name(id, name, 31)
set_hudmessage(8, 12, 248, 0.0, 0.5, 0, 6.0, 25.0)
show_hudmessage(id, "[Nationals | Gaming] Ust Yetkili Admin Oyuna Giris Yapti...")

client_cmd(0, "spk admin/admin_online")
}

public client_disconnect(id)
{
if(get_user_flags(id) & ADMIN_RCON)
{
set_task(70.0, "admindisconnect", id)
}
}

public admindisconnect(id)
{
new name[32]
get_user_name(id, name, 31)
set_hudmessage(8, 12, 248, 0.0, 0.5, 0, 6.0, 25.0)
show_hudmessage(id, "[Nationals | Gaming] Ust Yetkili Admin Oyundan Cikti...")
client_cmd(0, "spk admin/byebye")
}
public plugin_precache()
{
precache_sound("admin/admin_online.wav")
precache_sound("admin/byebye.wav")
}

sma düzenleme

Gönderilme zamanı: Cmt May 13, 2017 12:20 am
gönderen MehmetReis-
TunnS[C] yazdı:Cholor chat hatası vermesı sacma plugınde cholorchat kullanılmamıs.

Kod: Tümünü seç

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Sahip Girisi"
#define VERSION "1.0"
#define AUTHOR "MuhammeDesigN"

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
}

public client_putinserver(id)
{
if(get_user_flags(id) & ADMIN_RCON)
{
set_task(70.0, "adminconnect", id)
}
}

public adminconnect(id)
{
new name[32]
get_user_name(id, name, 31)
set_hudmessage(8, 12, 248, 0.0, 0.5, 0, 6.0, 25.0)
show_hudmessage(id, "[Nationals | Gaming] Ust Yetkili Admin Oyuna Giris Yapti...")

client_cmd(0, "spk admin/admin_online")
}

public client_disconnect(id)
{
if(get_user_flags(id) & ADMIN_RCON)
{
set_task(70.0, "admindisconnect", id)
}
}

public admindisconnect(id)
{
new name[32]
get_user_name(id, name, 31)
set_hudmessage(8, 12, 248, 0.0, 0.5, 0, 6.0, 25.0)
show_hudmessage(id, "[Nationals | Gaming] Ust Yetkili Admin Oyundan Cikti...")
client_cmd(0, "spk admin/byebye")
}
public plugin_precache()
{
precache_sound("admin/admin_online.wav")
precache_sound("admin/byebye.wav")
}
peki ne hatası var bunda ?

sma düzenleme

Gönderilme zamanı: Cmt May 13, 2017 12:20 am
gönderen MehmetReis-
TunnS[C] yazdı:Cholor chat hatası vermesı sacma plugınde cholorchat kullanılmamıs.

Kod: Tümünü seç

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Sahip Girisi"
#define VERSION "1.0"
#define AUTHOR "MuhammeDesigN"

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
}

public client_putinserver(id)
{
if(get_user_flags(id) & ADMIN_RCON)
{
set_task(70.0, "adminconnect", id)
}
}

public adminconnect(id)
{
new name[32]
get_user_name(id, name, 31)
set_hudmessage(8, 12, 248, 0.0, 0.5, 0, 6.0, 25.0)
show_hudmessage(id, "[Nationals | Gaming] Ust Yetkili Admin Oyuna Giris Yapti...")

client_cmd(0, "spk admin/admin_online")
}

public client_disconnect(id)
{
if(get_user_flags(id) & ADMIN_RCON)
{
set_task(70.0, "admindisconnect", id)
}
}

public admindisconnect(id)
{
new name[32]
get_user_name(id, name, 31)
set_hudmessage(8, 12, 248, 0.0, 0.5, 0, 6.0, 25.0)
show_hudmessage(id, "[Nationals | Gaming] Ust Yetkili Admin Oyundan Cikti...")
client_cmd(0, "spk admin/byebye")
}
public plugin_precache()
{
precache_sound("admin/admin_online.wav")
precache_sound("admin/byebye.wav")
}
peki ne hatası var bunda ?

sma düzenleme

Gönderilme zamanı: Cmt May 13, 2017 12:20 am
gönderen TunnS[C]
suan benım attıgımda hata yok derleyıcı hata vermedı denesene bı

sma düzenleme

Gönderilme zamanı: Cmt May 13, 2017 12:29 am
gönderen MehmetReis-
TunnS[C] yazdı:suan benım attıgımda hata yok derleyıcı hata vermedı denesene bı
cl disconnect hatası verdi ondanda birşey olmaz şunu anlamadım ben baktım hata veriyor ama bu ne hatası anlamadım gitti

sma düzenleme

Gönderilme zamanı: Cmt May 13, 2017 12:34 am
gönderen TunnS[C]
Buyur

Kod: Tümünü seç

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Sahip Girisi"
#define VERSION "1.0"
#define AUTHOR "MuhammeDesigN"

public plugin_init() {
   register_plugin(PLUGIN, VERSION, AUTHOR)
}

public client_putinserver(id)
{
if(get_user_flags(id) & ADMIN_RCON)
{
set_task(70.0, "adminconnect", id)
}
}

public adminconnect(id)
{
new name[32]
get_user_name(id, name, 31)
set_hudmessage(8, 12, 248, 0.0, 0.5, 0, 6.0, 25.0)
show_hudmessage(id, "[Nationals | Gaming] Ust Yetkili Admin Oyuna Giris Yapti...")

client_cmd(0, "spk admin/admin_online")
}

public client_disconnected(id)
{
if(get_user_flags(id) & ADMIN_RCON)
{
set_task(70.0, "admindisconnect", id)
}
}

public admindisconnect(id)
{
new name[32]
get_user_name(id, name, 31)
set_hudmessage(8, 12, 248, 0.0, 0.5, 0, 6.0, 25.0)
show_hudmessage(id, "[Nationals | Gaming] Ust Yetkili Admin Oyundan Cikti...")
client_cmd(0, "spk admin/byebye")
}
public plugin_precache()
{
precache_sound("admin/admin_online.wav")
precache_sound("admin/byebye.wav")
}

sma düzenleme

Gönderilme zamanı: Cmt May 13, 2017 12:36 am
gönderen MehmetReis-

Kod: Tümünü seç

#include <amxmodx>
#include <amxmisc>
//Tırnaklara dikkat ederek düzenleyiniz.
#define IPAdresi "213.238.173.78"

new round;
public plugin_init(){
	register_plugin("RoundBasiEklenti","1.0","CSmiLeFaCe")
	register_event("HLTV", "yeniround", "a", "1=0", "2=0");
	register_event("TextMsg", "sifirla", "a", "2=#Game_will_restart_in");
}
public yeniround(){
	round += 1;
    
	new harita[32]
	get_mapname(harita, 31)
	new toplam = get_maxplayers();
	new oyunda = get_playersnum(1);
    
	set_dhudmessage( 42, 127, 255, -1.0, 0.35, 2, 6.0, 200.0, 0.1, 1.5 );
	show_dhudmessage(0, "Harita %s",harita);
    
	set_dhudmessage( 0, 255, 0, -1.0, 0.35, 2, 6.0, 200.0, 0.1, 1.5 );
	show_dhudmessage(0, "^n^n%s",IPAdresi);
    
	set_dhudmessage( 0, 0, 255, -1.0, 0.35, 2, 6.0, 200.0, 0.1, 1.5 );
	show_dhudmessage(0, "^n^n^n^nGun %s - Sunucu: ",round, oyunda, toplam);
	return PLUGIN_CONTINUE;
}
public sifirla(){
    round = 0;    
}
 
bu senin paylaştığın csgo mod hata veriyor ve bu hataları anlamıyorum derleyiciden bak anlarsın cl_disconnect hatasını yapmayı biliyorum cl_disconnected yapıyoruz da bunları anlamıyorum