Skocz do zawartości

  • Zaloguj korzystając z Facebooka Zaloguj korzystając z Twittera Zaloguj przez Steam Zaloguj poprzez Google      Logowanie »   
  • Rejestracja

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.

  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie
Modyfikacja

prosba o przerobienie skillmod - zapis na nickskill mod przerobienie exp na nick

Modyfikacja skill mod exp na nick

  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
Brak odpowiedzi do tego tematu

#1 blaher

    Zaawansowany

  • Użytkownik

Reputacja: 0
zer0.

  • Postów:81
Offline

Napisano 27.04.2012 17:59

Prosilbym o pomoc w przerobieniu pluginu skill mod autorstwa DarkGT - chodzi o zapis na nick/IP, zamiast na steamID, Siedze nad tematem juz 2 dni, widzialem rady z tematu : http://amxx.pl/topic...lder-skill-mod/ opcja podana przez DarkGL niestety nie dziala, usuwam pliki z /data/vault proszę o pomoc, wrzucam orgyginalna - pare rang. Prosilbym o pomoc

/* Script generated by Pawn Studio */
#include <amxmodx>
#include <amxmisc>
#include <nvault>
#include <cstrike>
#include <colorchat>
#include <engine>
#include <hamsandwich>
#include <fun>
#include <fakemeta>
#define PLUGIN "BB Skill Mod"
#define AUTHOR "DarkGL"
#define VERSION "0.1a by nevp Bermud.pl"
new player_xp[33];
new player_xp_all[33];
new level[33];
new rangi[][256]={
"Szeregowy",
"Starszy szeregowy",
"Kapral",
"Starszy kapral",
"Plutonowy",
"Sierzant",
"Starszy sierzant",
"Podporucznik",
"Porucznik",
"Kapitan",
"Major",
"General brygady",
"General dywizji",
"General broni",
"General",
"Marszalek"
}
new exp[]={
1000,
2000,
4000,
7000,
9000,
11000,
13000,
15000,
17000,
19000,
23000,
26000,
29000,
33000,
37000,
41000,
45000,
}
new zapis;
new msgtext;
new pcvar_exp_round,pcvar_exp_kill_ct,pcvar_exp_kill_tt,pcvar_exp_level,pcvar_exp_hs,pcvar_hud;
new dmg_level[33];
new health[33];
new shot_time_level[33],Weapons[33][2];
new magazynek[33];
new ile_dodac_magazynek[33]
new stare_id_broni[33]
new stare_ammo[33];
new const Float:gfCSSpeeds[]={
000.0,
250.0, 000.0, 260.0, 250.0, 240.0,
250.0, 250.0, 240.0, 250.0, 250.0,											 
250.0, 250.0, 210.0, 240.0, 240.0, 
250.0, 250.0, 210.0, 250.0, 220.0,									   
230.0, 230.0, 250.0, 210.0, 250.0,							 
250.0, 235.0, 221.0, 250.0, 245.0
};
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_logevent("Koniec_Rundy", 2, "1=Round_End")
register_concmd("add_exp","addexp",ADMIN_BAN,"dodaje expa nick i ile")
register_event("DeathMsg", "DeathMsg", "a")
pcvar_exp_round = register_cvar("bb_exp_round","50");
pcvar_exp_kill_ct = register_cvar("bb_exp_kill_ct","20");
pcvar_exp_kill_tt = register_cvar("bb_exp_kill_tt","10");
pcvar_exp_level = register_cvar("bb_exp_level","40");
pcvar_exp_hs = register_cvar("bb_exp_hs","5");
pcvar_hud = register_cvar("bb_hud","0");
zapis = nvault_open("exp")
register_event("ResetHUD","ShowHUD", "b");
register_event("CurWeapon","Event_CurWeapon", "b")
msgtext = get_user_msgid("StatusText");
register_clcmd("say /skille","skille_menu");
register_clcmd("say /sk","skille_menu");
register_clcmd("say /staty","staty");
register_clcmd("say /st","staty");
register_clcmd("say /reset","reset");
register_clcmd("say /r","reset");
RegisterHam(Ham_TakeDamage, "player", "fwTakeDamage", 0);
RegisterHam(Ham_Spawn,"player","spawned",1)
register_event("CurWeapon","CurWeapon","be", "1=1")
register_clcmd("say","sayhandle");
set_task(120.0,"pomoc",40)
}
public plugin_precache(){
precache_sound("darkgl/bb/gained_level.wav");
}
public plugin_end(){
nvault_close(zapis);
}
public sayhandle(id){
new text[192]
read_argv(1,text,191)
if(equal(text,"")){
  return PLUGIN_HANDLED;
}
new name[128];
get_user_name(id,name,127)
ColorChat(0,GREEN,"[%s] ^x03%s^x01: %s",rangi[level[id]],name,text)
return PLUGIN_HANDLED;
}
public CurWeapon(id)
{
new wid = read_data(2) // Id broni
if(wid == CSW_XM1014 || wid == CSW_C4 || wid == CSW_FLASHBANG || wid == CSW_HEGRENADE || wid == CSW_KNIFE || wid == CSW_SMOKEGRENADE){
  return PLUGIN_CONTINUE;
}
if(wid != stare_id_broni[id]){
  ile_dodac_magazynek[id] = magazynek[id]/2;
  stare_id_broni[id] = wid;
  return PLUGIN_CONTINUE;
}
new ammo = read_data(3) // liczba naboi w magazynku
if(ammo > stare_ammo[id]){
  ile_dodac_magazynek[id] = magazynek[id]/2;
  stare_ammo[id] = ammo;
  return PLUGIN_CONTINUE;
}
if(ile_dodac_magazynek[id] == 0){
  return PLUGIN_CONTINUE;
}
new ent = fm_get_user_weapon_entity(id);
if(ent){
  cs_set_weapon_ammo(ent, ammo+1);
  ile_dodac_magazynek[id]--;
}
return PLUGIN_CONTINUE;
}
public skille_menu(id){
new menu = menu_create("Skill menu","skille_menu_handle");
new formats[128];
format(formats,charsmax(formats),"Wieksze DMG [%d Exp] Aktualny level: \r%d",get_pcvar_num(pcvar_exp_level)*(dmg_level[id]+1),dmg_level[id])
menu_additem(menu,formats)
format(formats,charsmax(formats),"Wiecej zycia [%d Exp] Aktualny level: \r%d",get_pcvar_num(pcvar_exp_level)*(health[id]+1),health[id])
menu_additem(menu,formats)
format(formats,charsmax(formats),"Szybsze strzelanie [%d Exp] Aktualny level: \r%d",get_pcvar_num(pcvar_exp_level)*(shot_time_level[id]+1),shot_time_level[id])
menu_additem(menu,formats)
format(formats,charsmax(formats),"Wiekszy magazynek [%d Exp] Aktualny level: \r%d",get_pcvar_num(pcvar_exp_level)*(magazynek[id]+1),magazynek[id])
menu_additem(menu,formats)
menu_setprop(menu,MPROP_EXIT,MEXIT_ALL);
menu_setprop(menu,MPROP_NUMBER_COLOR,"\r");
menu_display(id, menu,0);
return PLUGIN_HANDLED;
}
skille_menu2(id,page=0){
new menu = menu_create("Skill menu","skille_menu_handle2");
new formats[128];
format(formats,charsmax(formats),"Wieksze DMG [%d Exp] Aktualny level: \r%d",get_pcvar_num(pcvar_exp_level)*(dmg_level[id]+1),dmg_level[id])
menu_additem(menu,formats)
format(formats,charsmax(formats),"Wiecej zycia [%d Exp] Aktualny level: \r%d",get_pcvar_num(pcvar_exp_level)*(health[id]+1),health[id])
menu_additem(menu,formats)
format(formats,charsmax(formats),"Szybsze strzelanie [%d Exp] Aktualny level: \r%d",get_pcvar_num(pcvar_exp_level)*(shot_time_level[id]+1),shot_time_level[id])
menu_additem(menu,formats)
format(formats,charsmax(formats),"Wiekszy magazynek [%d Exp] Aktualny level: \r%d",get_pcvar_num(pcvar_exp_level)*(magazynek[id]+1),magazynek[id])
menu_additem(menu,formats)
menu_setprop(menu,MPROP_EXIT,MEXIT_ALL);
menu_setprop(menu,MPROP_NUMBER_COLOR,"\r");
menu_display(id, menu,page);
return PLUGIN_HANDLED;
}
public skille_menu_handle(id, menu, item){
if(item == MENU_EXIT){
  menu_destroy(menu);
  return PLUGIN_HANDLED;
}
item++;
switch(item){
  case 1:{
   if((get_pcvar_num(pcvar_exp_level)*(dmg_level[id]+1)) > player_xp[id]){
	    skille_menu2(id);
	    menu_destroy(menu);
	    return PLUGIN_HANDLED;
   }
   player_xp[id]-=get_pcvar_num(pcvar_exp_level)*(dmg_level[id]+1);
   dmg_level[id]++;
   skille_menu2(id);
   menu_destroy(menu);
   return PLUGIN_HANDLED;
  }
  case 2:{
   if((get_pcvar_num(pcvar_exp_level)*(health[id]+1)) > player_xp[id]){
	    skille_menu2(id);
	    menu_destroy(menu);
	    return PLUGIN_HANDLED;
   }
   player_xp[id]-=get_pcvar_num(pcvar_exp_level)*(health[id]+1);
   health[id]++;
   skille_menu2(id);
   menu_destroy(menu);
   return PLUGIN_HANDLED;
  }
  case 3:
  {
   if((get_pcvar_num(pcvar_exp_level)*(shot_time_level[id]+1)) > player_xp[id]){
	    skille_menu2(id);
	    menu_destroy(menu);
	    return PLUGIN_HANDLED;
   }
   player_xp[id]-=get_pcvar_num(pcvar_exp_level)*(shot_time_level[id]+1);
   shot_time_level[id]++;
   skille_menu2(id);
   menu_destroy(menu);
   return PLUGIN_HANDLED;
  }
  case 4:
  {
   if((get_pcvar_num(pcvar_exp_level)*(magazynek[id]+1)) > player_xp[id]){
	    skille_menu2(id);
	    menu_destroy(menu);
	    return PLUGIN_HANDLED;
   }
   ile_dodac_magazynek[id] = magazynek[id]/2
   player_xp[id]-=get_pcvar_num(pcvar_exp_level)*(magazynek[id]+1);
   magazynek[id]++;
   skille_menu2(id,1);
   menu_destroy(menu);
   return PLUGIN_HANDLED;
  }
}
menu_destroy(menu);
return PLUGIN_HANDLED;
}
public skille_menu_handle2(id, menu, item){
if(item == MENU_EXIT){
  menu_destroy(menu);
  return PLUGIN_HANDLED;
}
item++;
switch(item){
  case 1:{
   if((get_pcvar_num(pcvar_exp_level)*(dmg_level[id]+1)) > player_xp[id]){
	    skille_menu2(id);
	    menu_destroy(menu);
	    return PLUGIN_HANDLED;
   }
   player_xp[id]-=get_pcvar_num(pcvar_exp_level)*(dmg_level[id]+1);
   dmg_level[id]++;
   skille_menu2(id);
   menu_destroy(menu);
   return PLUGIN_HANDLED;
  }
  case 2:{
   if((get_pcvar_num(pcvar_exp_level)*(health[id]+1)) > player_xp[id]){
	    skille_menu2(id);
	    menu_destroy(menu);
	    return PLUGIN_HANDLED;
   }
   player_xp[id]-=get_pcvar_num(pcvar_exp_level)*(health[id]+1);
   health[id]++;
   skille_menu2(id);
   menu_destroy(menu);
   return PLUGIN_HANDLED;
  }
  case 3:
  {
   if((get_pcvar_num(pcvar_exp_level)*(shot_time_level[id]+1)) > player_xp[id]){
	    skille_menu2(id);
	    menu_destroy(menu);
	    return PLUGIN_HANDLED;
   }
   player_xp[id]-=get_pcvar_num(pcvar_exp_level)*(shot_time_level[id]+1);
   shot_time_level[id]++;
   skille_menu2(id);
   menu_destroy(menu);
   return PLUGIN_HANDLED;
  }
  case 4:
  {
   if((get_pcvar_num(pcvar_exp_level)*(magazynek[id]+1)) > player_xp[id]){
	    skille_menu2(id);
	    menu_destroy(menu);
	    return PLUGIN_HANDLED;
   }
   ile_dodac_magazynek[id] = magazynek[id]/2
   player_xp[id]-=get_pcvar_num(pcvar_exp_level)*(magazynek[id]+1);
   magazynek[id]++;
   skille_menu2(id,1);
   menu_destroy(menu);
   return PLUGIN_HANDLED;
  }
}
menu_destroy(menu);
return PLUGIN_HANDLED;
}
public reset(id){
new exp = 0;
new exp2 =get_pcvar_num(pcvar_exp_level);
for(new i =1;i<=dmg_level[id];i++){
  exp+=exp2*i
}
dmg_level[id] = 0;
for(new i =1;i<=health[id];i++){
  exp+=exp2*i
}
health[id] = 0;
for(new i =1;i<=shot_time_level[id];i++){
  exp+=exp2*i
}
shot_time_level[id] = 0;
for(new i =1;i<=magazynek[id];i++){
  exp+=exp2*i
}
magazynek[id] = 0;
player_xp[id] += exp;
skille_menu(id);
}
public staty(id){
new path_to_file[128]
new amxbasedir[64]
get_basedir(amxbasedir,63)
format(path_to_file,127,"%s/base/stats.txt",amxbasedir)
if(file_exists(path_to_file)){
  delete_file(path_to_file)
}
new Data[1025];
format(Data,1024,"<html><head><title>Informacje o skillach</title></head>")
write_file(path_to_file,Data,-1)
format(Data,1024,"<body text=white bgcolor=black></body>")
write_file(path_to_file,Data,-1)
format(Data,1024,"<b>Ranga: %s</b><br />",rangi[level[id]])
write_file(path_to_file,Data,-1)
format(Data,1024,"<b>Aktualny Exp: %d | Caly exp: %d</b><br />",player_xp[id],player_xp_all[id])
write_file(path_to_file,Data,-1)
if(level[id]== sizeof(rangi)-1){
  format(Data,1024,"<b>Ranga : %s | Nastepna ranga : Jestes najlepszy !/b><br />",rangi[level[id]])
  write_file(path_to_file,Data,-1)
}
else
{
  format(Data,1024,"<b>Ranga : %s | Nastepna ranga : %s (%d)</b><br />",rangi[level[id]],rangi[level[id]+1],exp[level[id]])
  write_file(path_to_file,Data,-1)
}
format(Data,1024,"<b>Dmg wiekszy o %d %%</b><br />",dmg_level[id])
write_file(path_to_file,Data,-1)
format(Data,1024,"<b>Plus %d do hp</b><br />",health[id]*4)
write_file(path_to_file,Data,-1)
format(Data,1024,"<b>Szybsze strzelanie o %d %%</b><br />",shot_time_level[id])
write_file(path_to_file,Data,-1)
format(Data,1024,"<b>Wiekszy magazynek o %d %%</b><br />",magazynek[id]/2)
write_file(path_to_file,Data,-1)
format(Data,1024,"</html>")
write_file(path_to_file,Data,-1)
show_motd(id, path_to_file, "Informacje o postaci")
return PLUGIN_HANDLED
}
public pomoc(){
ColorChat(0,GREEN,"Chcesz polepszyć swoje statystyki napisz na czacie /skille");
set_task(120.0,"pomoc2",36)
}
public pomoc2(){
ColorChat(0,GREEN,"Zobacz statystyki swoich skilli wpisujac na czacie /staty");
set_task(120.0,"pomoc3",37)
}
public pomoc3(){
ColorChat(0,GREEN,"Zresetuj swoje statystyki poprzez /reset");
set_task(120.0,"pomoc",35)
}
public Koniec_Rundy(){
for(new i = 1;i<33;i++){
  if(is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_CT){
   DajExp(i,get_pcvar_num(pcvar_exp_round));
   ColorChat(i,GREEN,"^x03 Dostales %d expa za przezycie",get_pcvar_num(pcvar_exp_round));
   set_hudmessage(random_num(0,227), random_num(0,184),random_num(0,036), -1.0, -1.0, 0, 6.0, 5.0, 0.0, 0.0, -1)
   show_hudmessage(i,"Dostales %d expa za przezycie",get_pcvar_num(pcvar_exp_round));
  }
}
}
public addexp(id, level, cid){
if(!cmd_access(id, level, cid, 3)){
  return PLUGIN_HANDLED;
}
new arg1[33];
new arg2[10];
read_argv(1,arg1,32);
read_argv(2,arg2,9);
new player = cmd_target(id, arg1, 0);
remove_quotes(arg2);
new exp = str_to_num(arg2);
if(exp != 0 && exp < 0 ){
  OdejmijExp(player,exp);
}
else if(exp != 0 && exp > 0 ){
  DajExp(player,exp);
}
return PLUGIN_HANDLED;
}
public OdejmijExp(id,ile){
player_xp[id]-=ile;
player_xp_all[id]-=ile;
level[id]=0;
while(true){
  if(player_xp_all[id] >= exp[level[id]]){
   level[id]++;
   //set_hudmessage(random_num(0,227), random_num(0,184),random_num(0,036), -1.0, -1.0, 0, 6.0, 5.0, 0.0, 0.0, -1)
   //show_hudmessage(id,"Awansowales na kolejny level (%s)",rangi[level[id]]);
   //ColorChat(0,GREEN,"^x03 Awansowal do rangi ^x01 %s gratki <img src='http://amxx.pl/public/style_emoticons/<#EMO_DIR#>/biggrin.png' class='bbc_emoticon' alt=':D' />",rangi[level[id]]);
  }
  else
  {
   break;
  }
}
}
public DajExp(id,ile){
player_xp[id]+=ile;
player_xp_all[id]+=ile;
new name[64];
get_user_name(id,name,63);
while(true){
  if(player_xp_all[id] >= exp[level[id]] && sizeof(rangi) > level[id]){
   level[id]++;
   set_hudmessage(random_num(0,227), random_num(0,184),random_num(0,036), -1.0, -1.0, 0, 6.0, 5.0, 0.0, 0.0, -1)
   show_hudmessage(id,"Awansowales na kolejny level (%s)",rangi[level[id]]);
   ColorChat(0,GREEN,"^x03%s awansowal do rangi ^x01 %s ^x03gratki <img src='http://amxx.pl/public/style_emoticons/<#EMO_DIR#>/biggrin.png' class='bbc_emoticon' alt=':D' />",name,rangi[level[id]]);
   emit_sound(id,CHAN_VOICE,"darkgl/bb/gained_level.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
  }
  else
  {
   break;
  }
}
}
public client_connect(id){
health[id] = 0;
dmg_level[id] = 0;
level[id] = 0;
player_xp[id] = 0;
player_xp_all[id] = 0;
shot_time_level[id] = 0;
magazynek[id] = 0;
stare_id_broni[id] = 0;
ile_dodac_magazynek[id] = 0;
wczytaj_exp(id);
}
public client_disconnect(id){
zapisz_exp(id);
}
public wczytaj_exp(id){
new vaultkey[64],vaultdata[512];
new authid[64];
get_user_authid(id,authid,63);
format(vaultkey,63,"%s",authid);
nvault_get(zapis,vaultkey,vaultdata,511);
replace_all(vaultdata,256,"#"," ");
new jeden[100],dwa[100],trzy[100],cztery[100],piec[100],szesc[100],siedem[100],osiem[100],dziew[100],dzies[100],jedenascie[100],dwanascie[100]
parse(vaultdata,jeden,99,dwa,99,trzy,99,cztery,99,piec,99,szesc,99,siedem,99,osiem,99,dziew,99,dzies,99,jedenascie,99,dwanascie,99)
player_xp[id] = str_to_num(jeden);
player_xp_all[id] = str_to_num(dwa);
dmg_level[id] = str_to_num(trzy);
health[id] = str_to_num(cztery);
shot_time_level[id] = str_to_num(piec);
magazynek[id] = str_to_num(szesc);
while(true){
  if(player_xp_all[id] >= exp[level[id]] && sizeof(rangi) > level[id]){
   level[id]++;
  }
  else
  {
   break;
  }
}
}
public zapisz_exp(id){
new vaultkey[64],vaultdata[512];
new authid[64];
get_user_authid(id,authid,63);
format(vaultkey,63,"%s",authid);
format(vaultdata,511,"%d#%d#%d#%d#%d#%d#%d#%d#%d#%d#%d#%d",player_xp[id],player_xp_all[id],dmg_level[id],health[id],shot_time_level[id],magazynek[id]);
nvault_set(zapis,vaultkey,vaultdata)
}
public ShowHUD(id)  {
if(is_user_alive(id)){
  new HUD[128];
  format(HUD, 127,"[%s] Aktualny Exp: %d | Caly exp: %d",rangi[level[id]],player_xp[id],player_xp_all[id]);
  if(get_pcvar_num(pcvar_hud) == 0 ){
   message_begin(MSG_ONE, msgtext, {0,0,0}, id);
   write_byte(0);
   write_string(HUD);
   message_end();
   return PLUGIN_CONTINUE;
  }
  else
  {
   set_hudmessage(227, 184, 036, 0.02, 0.63, 0, 6.0, 15.0)
   show_hudmessage(id, "%s",HUD)
  }
}
return PLUGIN_CONTINUE;
}
public client_PreThink(id){
if(!is_user_alive(id)){
  return PLUGIN_CONTINUE;
}
if(is_user_alive(id) && !is_user_bot(id)){
  new asd,aim
  get_user_aiming(id,aim,asd);
  if(is_user_alive(aim)){
   ShowHUD(id);
  }
}
return PLUGIN_CONTINUE;
}
public DeathMsg()
{
new kid = read_data(1) //zabojca
new vid = read_data(2) // ofiara
new hs = read_data(3) // ofiara
if(cs_get_user_team(kid)==CS_TEAM_CT && cs_get_user_team(vid)==CS_TEAM_T){
  DajExp(kid,get_pcvar_num(pcvar_exp_kill_tt));
  set_user_health(kid,get_user_health(kid));
  new name[64];
  get_user_name(vid,name,charsmax(name));
  ColorChat(kid,TEAM_COLOR,"Zdobyles %d expa za zabicie %s",get_pcvar_num(pcvar_exp_kill_tt),name)
  if(hs == 1){
   DajExp(kid,get_pcvar_num(pcvar_exp_hs));
   ColorChat(kid,TEAM_COLOR,"Zdobyles %d expa za hs'a",get_pcvar_num(pcvar_exp_hs))
  }
}
else if(cs_get_user_team(kid)==CS_TEAM_T && cs_get_user_team(vid)==CS_TEAM_CT){
  DajExp(kid,get_pcvar_num(pcvar_exp_kill_ct));
  set_user_health(kid,get_user_health(kid));
  new name[64];
  get_user_name(vid,name,charsmax(name));
  ColorChat(kid,TEAM_COLOR,"Zdobyles %d expa za zabicie %s",get_pcvar_num(pcvar_exp_kill_ct),name)
  if(hs == 1){
   DajExp(kid,get_pcvar_num(pcvar_exp_hs));
   ColorChat(kid,TEAM_COLOR,"Zdobyles %d expa za hs'a",get_pcvar_num(pcvar_exp_hs))
  }
}
}
public fwTakeDamage(this, idinflictor, idattacker,Float:damage, damagebits){
SetHamParamFloat(4,damage+(damage*(dmg_level[idattacker]*0.01)));
return HAM_HANDLED;
}
public spawned(id){
if(is_user_alive(id)){
  set_user_health(id,get_user_health(id)+(health[id]*4))
}
}
public Event_CurWeapon(id)
{
if(!is_user_alive(id)){
  return PLUGIN_CONTINUE
}
new bron=read_data(2)
//set_user_maxspeed(id,gfCSSpeeds[bron]+(gfCSSpeeds[bron]*0.02));
ShowHUD(id);
new Gun = read_data(2)
if(Gun==0 || Gun==6 || Gun==29 || Gun>30)
  return PLUGIN_CONTINUE
new Ammo = read_data(3)
if(Weapons[id][0] == Gun && Weapons[id][1] <= Ammo)
{
  Weapons[id][1] = Ammo
  return PLUGIN_CONTINUE
}
Weapons[id][0] = Gun
Weapons[id][1] = Ammo
new weapon[32]
get_weaponname(Gun,weapon,31)
new Ent = fm_find_ent_by_owner(-1,weapon,id)
if(Ent)
{
  new Float:Delay = get_pdata_float( Ent, 46, 4) * (1.0-(shot_time_level[id]*0.01));
  if (Delay > 0.0){
   set_pdata_float( Ent, 46, Delay, 4)
  }
  else
  {
   set_pdata_float( Ent, 46, 0.01, 4)
  }
}
return PLUGIN_CONTINUE
}
//Frome Fakemeta utility
stock fm_find_ent_by_owner(index, const classname[], owner, jghgtype = 0)
{
new strtype[11] = "classname", ent = index
switch (jghgtype)
{
  case 1: strtype = "target"
   case 2: strtype = "targetname"
  }
while ((ent = engfunc(EngFunc_FindEntityByString, ent, strtype, classname)) && pev(ent, pev_owner) != owner) {}
return ent
}
stock fm_get_user_weapon_entity(id, wid = 0) {
new weap = wid, clip, ammo
if (!weap && !(weap = get_user_weapon(id, clip, ammo)))
  return 0
new class[32]
get_weaponname(weap, class, sizeof class - 1)
return fm_find_ent_by_owner(-1, class, id)
}

Użytkownik blaher edytował ten post 27.04.2012 18:00

  • +
  • -
  • 0





Również z jednym lub większą ilością słów kluczowych: Modyfikacja, skill mod exp na nick

Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych