←  Pytania dotyczące pluginów

AMXX.pl: Support AMX Mod X i SourceMod

»

Edycja pluginu Rangi CSGO

  • +
  • -
klaudusiax3 - zdjęcie klaudusiax3 04.03.2017

Witam, ściągnęłam plugin https://amxx.pl/topi...0099-rangicsgo/lecz rangi migają i się same zmieniają, czy ktoś by dał rade to edytować by to było w "miejscu" a nie się zmieniały ? ;d z góry Dziękuję ! :)

Odpowiedz

  • +
  • -
Hiko - zdjęcie Hiko 04.03.2017

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <csx>
#include <ColorChat>

#define TASK 666

#define PLUGIN "RangiCSGO"
#define VERSION "1.3"
#define AUTHOR "klqs"

new ranga[33];
new cvar
new sync;
new const limit = 18;
new const limit_min = 1
new const rangi[][] = {
	{5, "Silver I"},
	{15, "Silver II"},
	{30, "Silver III"},
	{50, "Silver IV"},
	{75, "Silver elite"},
	{100, "Silver elite master"},
	{150, "Gold nova I"},
	{200, "Gold nova II"},
	{300, "Gold nova III"},
	{500, "Gold nova master"},
	{750, "Master guardian I"},
	{1000, "Master guardian II"},
	{1500, "Master guardian elite"},
	{2000, "Distinguished master guardian"},
	{2500, "Legendary eagle"},
	{3000, "Legendary eagle master"},
	{5000, "Supreme master first class"},
	{999999, "THE GLOBAL ELITE"}
}
new Float:liczby[] = {0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1.0, 1.05, 1.1, 1.15, 1.2, 1.25, 1.3, 1.35, 2000.0}
public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_clcmd("say /rangi", "motd")
	sync = CreateHudSyncObj()
	register_cvar("rangi_kolor", "0")
}
public client_connect(id)
{
	new param[1]
	param[0] = id
	set_task(0.1,"rank",TASK+id,param,1,"b")
}

public client_disconnect(id)
{
	if(task_exists(TASK+id))
	remove_task(TASK+id)
}
public rank(param[])
{
	new id = param[0]
	new stats[8]
	new body[8]
	get_user_stats(id, stats, body)		
	if(!is_user_alive(id))
	{
		id = pev(id, pev_iuser2);
		if(!id)
			id = param[0]
	}
	new Float:kdratio[33]
	kdratio[id] = float(stats[0]) / float(stats[1])


	if(kdratio[id] >= liczby[ranga[id]] && stats[0] >= rangi[ranga[id]][0] && ranga[id] < limit)
		ranga[id]++

	if(kdratio[id] < liczby[ranga[id]] && ranga[id] > limit_min)
		ranga[id]--
		
	new name[33]
	get_user_name(id,name,32)
	cvar = get_cvar_num("rangi_kolor")
	switch(cvar)
	{
		case 0:
		{
			set_hudmessage(255, 255, 255, 0.01, 0.22)
			ShowSyncHudMsg(id, sync, "[CSGO]^n[Nick: %s]^n[Ranga: %s]^n[Zabojstwa: %d]^n[Stosunek: %0.2f%]", name , rangi[ranga[id]][1], stats[0], kdratio[id])
		}
		case 1:
		{
			set_hudmessage(255, 0, 0, 0.01, 0.22)
			ShowSyncHudMsg(id, sync, "[CSGO]^n[Nick: %s]^n[Ranga: %s]^n[Zabojstwa: %d]^n[Stosunek: %0.2f%]", name , rangi[ranga[id]][1], stats[0], kdratio[id])
		}
		case 2:
		{
			set_hudmessage(0, 255, 0, 0.01, 0.22)
			ShowSyncHudMsg(id, sync, "[CSGO]^n[Nick: %s]^n[Ranga: %s]^n[Zabojstwa: %d]^n[Stosunek: %0.2f%]", name , rangi[ranga[id]][1], stats[0], kdratio[id])	
		}
		case 3:
		{
			set_hudmessage(0, 0, 255, 0.01, 0.22)
			ShowSyncHudMsg(id, sync, "[CSGO]^n[Nick: %s]^n[Ranga: %s]^n[Zabojstwa: %d]^n[Stosunek: %0.2f%]", name , rangi[ranga[id]][1], stats[0], kdratio[id])
		}
	}
}
public motd(id)
	if(is_user_connected(id))
		show_motd(id, "rangi.txt", "Rangi na serwerze");

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

sprawdz teraz jezeli nadal migaja zawsze mozesz usunac ten całe kdratio i nie bedzie migać :)

Odpowiedz

  • +
  • -
klaudusiax3 - zdjęcie klaudusiax3 04.03.2017

jak to kompiluje to mi błędy wyskakują ;d i wlasnie chce zeby bylo to kd ratio ;d

Odpowiedz

  • +
  • -
Hiko - zdjęcie Hiko 04.03.2017

/* Plugin generated by AMXX-Studio */


#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <csx>
#include <ColorChat>


#define TASK 666


#define PLUGIN "RangiCSGO"
#define VERSION "1.3"
#define AUTHOR "klqs"


new ranga[33];
new cvar
new sync;
new const limit = 18;
new const limit_min = 1
new const rangi[][] = {
{5, "Silver I"},
{15, "Silver II"},
{30, "Silver III"},
{50, "Silver IV"},
{75, "Silver elite"},
{100, "Silver elite master"},
{150, "Gold nova I"},
{200, "Gold nova II"},
{300, "Gold nova III"},
{500, "Gold nova master"},
{750, "Master guardian I"},
{1000, "Master guardian II"},
{1500, "Master guardian elite"},
{2000, "Distinguished master guardian"},
{2500, "Legendary eagle"},
{3000, "Legendary eagle master"},
{5000, "Supreme master first class"},
{999999, "THE GLOBAL ELITE"}
}
new Float:liczby[] = {0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1.0, 1.05, 1.1, 1.15, 1.2, 1.25, 1.3, 1.35, 2000.0}
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /rangi", "motd")
sync = CreateHudSyncObj()
register_cvar("rangi_kolor", "0")
}
public client_connect(id)
{
new param[1]
param[0] = id
set_task(0.1,"rank",TASK+id,param,1,"b")
}


public client_disconnect(id)
{
if(task_exists(TASK+id))
remove_task(TASK+id)
}
public rank(param[])
{
new id = param[0]
new stats[8]
new body[8]
get_user_stats(id, stats, body) 
if(!is_user_alive(id))
{
id = pev(id, pev_iuser2);
if(!id)
id = param[0]
}
new Float:kdratio[33]
kdratio[id] = float(stats[0]) / float(stats[1])




if(kdratio[id] >= liczby[ranga[id]] && stats[0] >= rangi[ranga[id]][0] && ranga[id] < limit)
ranga[id]++


if(kdratio[id] < liczby[ranga[id]] && ranga[id] > limit_min)
ranga[id]--


new name[33]
get_user_name(id,name,32)
cvar = get_cvar_num("rangi_kolor")
switch(cvar)
{
case 0:
{
set_hudmessage(255, 255, 255, 0.01, 0.22)
ShowSyncHudMsg(id, sync, "[Nick: %s]^n[Ranga: %s]^n[Zabojstwa: %d]^n[K/d ratio %0.2f%]", name , rangi[ranga[id]][1], stats[0], kdratio[id])
}
case 1:
{
set_hudmessage(255, 0, 0, 0.01, 0.22)
ShowSyncHudMsg(id, sync, "[Nick: %s]^n[Ranga: %s]^n[Zabojstwa: %d]^n[K/d ratio %0.2f%]", name , rangi[ranga[id]][1], stats[0], kdratio[id])
}
case 2:
{
set_hudmessage(0, 255, 0, 0.01, 0.22)
ShowSyncHudMsg(id, sync, "[Nick: %s]^n[Ranga: %s]^n[Zabojstwa: %d]^n[K/d ratio %0.2f%]", name , rangi[ranga[id]][1], stats[0], kdratio[id]) 
}
case 3:
{
set_hudmessage(0, 0, 255, 0.01, 0.22)
ShowSyncHudMsg(id, sync, "[Nick: %s]^n[Ranga: %s]^n[Zabojstwa: %d]^n[K/d ratio %0.2f%]", name , rangi[ranga[id]][1], stats[0], kdratio[id])
}
}
}
public motd(id)
if(is_user_connected(id))
show_motd(id, "rangi.txt", "Rangi na serwerze");


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

 


Użytkownik Hiko edytował ten post 04.03.2017 17:47
Odpowiedz

  • +
  • -
klaudusiax3 - zdjęcie klaudusiax3 05.03.2017

nw czy ja juz kompilowac nie umiem xDD kopiuje to wklejam zamiast poprzedniego daje kompiluj i bląd ;d cos zle robie ?! :D

Odpowiedz

  • +
  • -
Hiko - zdjęcie Hiko 05.03.2017

nwm w czym nmasz problem xD to jest czysty plugin sciagnelem go co podalas wyzej tylko zmieniłem set taska xD

Masz tu plugin xD

Załączone pliki

Odpowiedz