Skocz do zawartości

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

przerobienie pluginu redbull pod flage t


  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
5 odpowiedzi w tym temacie

#1 Adek97

    Pomocny

  • Użytkownik

Reputacja: 0
Nowy

  • Postów:57
  • Lokalizacja:Tarnów
Offline

Napisano 21.01.2015 10:31

Witam, da rade przerobić zeby, Jak dodaje HP, aby NIE dodawało ponad 100 ?

Zeby DALO Się uzyc Raz na runde, i zeby bylo pod flage "t"? Plugin Redbull TZN ZE TYLKO Gracze z flaga "t" Moga używac "say / redbull" i dostawac : D?



SMA daje
/ *
* _______ _ _ __ __
* | _____ / | | | | \ \ __ / /
* | | | | | | | | / \ | |
* | | | | ____ | | | | / __ \ | |
* | | ___ | ______ | | / \ |
* | | | _ | | | | | | / \ |
* | | | | | | | | | | | |
* | | ____ | | | | | | | | | |
* | _______ / | _ | | _ | \ _ / \ _ /
*
*
*
* Ostatnie Poprawki: 31/12/07
*
* ============
* Zmiany:
* ============
*
* V2.0
* -Dodano ML
* Kod -Optimized
*
* V1.0
* -Initial Release
*
* /
 
#define VERSION "2.0"
 
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
 
Nowy bool: has_rb [33]
Nowy cost_cvar, lasts_cvar, speed_cvar
 
plugin_init publicznego ()
{
register_plugin ("Red Bull", wersja "GHW_Chronic")
 
register_clcmd ("say / Red Bull", "say_cmd_handle")
 
cost_cvar = register_cvar ("RB_Cost", "2000"),
lasts_cvar = register_cvar ("RB_Lasts", "20,0")
speed_cvar = register_cvar ("RB_Speed", "650,0"),
 
register_event ("CurWeapon", "curweap", "za")
 
register_dictionary ("GHW_Red_Bull.txt"),
}
 
curweap publicznych (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))
}
}
 
client_connect publicznych (id) has_rb [id] = false
client_disconnect publicznych (id) has_rb [id] = false
 
say_cmd_handle publicznych (id)
{
if (! is_user_alive (id))
{
client_print (id, print_chat "[RB]% L", id, "MSG_NOBUY_DEAD")
}
else if (has_rb [id])
{
client_print (id, print_chat "[RB]% L", id, "MSG_NOBUY_HAVE")
}
else if (cs_get_user_money (id) <get_pcvar_num (cost_cvar))
{
client_print (id, print_chat "[RB]% L", id, "MSG_NOBUY_POOR", get_pcvar_num (cost_cvar))
}
więcej
{
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))
client_print (id, print_chat "[RB]% L", id, "MSG_REDBULL1")
client_print (id, print_chat "[RB]% L", id, "MSG_REDBULL2")
}
}
 
plus_hp publicznych (id)
{
if (has_rb [id]) set_user_health (id, get_user_health (id) +1)
}
 
redbull_over publicznych (id)
{
if (is_user_connected (id))
{
has_rb [id] = false
client_print (id, print_chat "[RB]% L", id, "MSG_REDBULL_OFF")
set_user_gravity (id, 1.0)
set_user_maxspeed (id, 320,0)
set_user_gravity (id, 1.0)
remove_task (id)
}
}

  • +
  • -
  • 0

#2 grankee

    Godlike

  • Support Team

Reputacja: 517
Wszechwiedzący

  • Postów:1 500
  • Lokalizacja:Radom
Offline

Napisano 23.01.2015 13:45

zedytuj to i daj z oryginalnymi tabulacjami, bo czytac sie nie da


  • +
  • -
  • 0

#3 Adek97

    Pomocny

  • Autor tematu
  • Użytkownik

Reputacja: 0
Nowy

  • Postów:57
  • Lokalizacja:Tarnów
Offline

Napisano 27.01.2015 23:07

tabulacjami tzn ? < sory za odkop>


  • +
  • -
  • 0

#4 IntelCom

    Wszechwiedzący

  • Power User

Reputacja: 100
Zaawansowany

  • Postów:500
  • GG:
  • Imię:Dawid
  • Lokalizacja:Opole
Offline

Napisano 28.01.2015 00:01

https://pl.m.wikiped.../wiki/Tabulacja

https://przepis-na-l.../04/tabulatory/

https://amxx.pl/?app...q&do=faq&read=9
  • +
  • -
  • 0

#5 psilocybe

    Toasty!

  • Power User

Reputacja: 252
Wszechwidzący

  • Postów:524
  • Steam:steam
  • Imię:Filip
  • Lokalizacja:PL
Offline

Napisano 28.01.2015 00:21

plugin_init publicznego ()

 

Nie widzicie że on to przez translator puścił? :D

 

To jest plugin GHW RedBull. Później przetłumaczę i wrzucę na forum bo nie widzę :P

#define VERSION	"2.0"

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

new bool:has_rb[33]
new cost_cvar, lasts_cvar, speed_cvar

public plugin_init()
{
	register_plugin("Red Bull",VERSION,"GHW_Chronic")

	register_clcmd("say /RedBull","say_cmd_handle")

	cost_cvar = register_cvar("RB_Cost","2000")
	lasts_cvar = register_cvar("RB_Lasts","20.0")
	speed_cvar = register_cvar("RB_Speed","650.0")

	register_event("CurWeapon","curweap","be")

	register_dictionary("GHW_Red_Bull.txt")
}

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))
	{
		client_print(id,print_chat,"[RB] %L",id,"MSG_NOBUY_DEAD")
	}
	else if(has_rb[id])
	{
		client_print(id,print_chat,"[RB] %L",id,"MSG_NOBUY_HAVE")
	}
	else if(cs_get_user_money(id)<get_pcvar_num(cost_cvar))
	{
		client_print(id,print_chat,"[RB] %L",id,"MSG_NOBUY_POOR",get_pcvar_num(cost_cvar))
	}
	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))
		client_print(id,print_chat,"[RB] %L",id,"MSG_REDBULL1")
		client_print(id,print_chat,"[RB] %L",id,"MSG_REDBULL2")
	}
}

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
		client_print(id,print_chat,"[RB] %L",id,"MSG_REDBULL_OFF")
		set_user_gravity(id,1.0)
		set_user_maxspeed(id,320.0)
		set_user_gravity(id,1.0)
		remove_task(id)
	}
}

  • +
  • -
  • 0

Dołączona grafika

Dołączona grafika


#6 Adek97

    Pomocny

  • Autor tematu
  • Użytkownik

Reputacja: 0
Nowy

  • Postów:57
  • Lokalizacja:Tarnów
Offline

Napisano 28.01.2015 12:12

To jak da rade zrobić to o co prosiłem :D?
  • +
  • -
  • 0




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

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