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
 

Wklejka 136441206032858 dodana przez Aqku, 27.03.2013 20:21
Typ:


136441206032858
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105.
106.
107.
108.
109.
110.
111.
112.
113.
114.
115.
116.
/* AMX Mod script. 
* 
* (c) 2003, AssKicR 
* This file is provided as is (no warranties). 
* Thanx to Vud911 for the idea 
* 
* Example: /przelej "persononyourteam" "amount" and it'll deducte the amount from your cash pool and add it to the targets. 
* 
* Result Of Example 
* SuperNewbie: "Can someone send me some $$$ for awp???" 
* SuperElitePlayerWhoHasTooMuch$$$: "I'm Bill Gates!!! 4000$ coming your way!!! 
* SuperElitePlayerWhohasTooMuch$$$: "/przelej newbie 4000" 
* [AMX] SuperElitePlayerWhohasTooMuch$$$ has transferred 4000$ to SuperNewbie. Give him a thanks  
* SuperNewbie: "Thank You SuperElitePlayerWhohasTooMuch$$$" 
* 
* Changelog 
* v.1.0.0 - Released 
* v 1.0.1 - Added a little more restriction... Dead People can't handle money anymore 
* v 1.0.2 - Added Restrict for cash stealing 
* v 1.0.3 - Added Cvars - mt_cashsteal, mt_cashdead, mt_cashteam 
* v 1.0.4 - Checked Code - Found one error.. Fixed 
* v 1.0.5 - Removed 7 instances of "return PLUGIN_CONTINUE" that was not supposed to be there 
* v 1.0.6 - New Bug that i had to fix :@ 
* v 1.0.7 - Found the bug that *** up plugin 
* v 1.0.8 - Another Update...
*/ 
 
#include <amxmod> 
#include <amxmisc> 
#include <fun>
#include <ColorChat>
 
public plugin_init() {  
	register_plugin("Cash Transfer","1.0.8","AssKicR")  
	register_concmd("say","handle_say",ADMIN_USER) 
	register_concmd("say_team","handle_say",ADMIN_USER) 
	register_cvar("mt_cashsteal","0",0) 
	register_cvar("mt_cashdead","1",0) 
	register_cvar("mt_cashteam","1",0) 
	return PLUGIN_CONTINUE  
} 
 
public handle_say(id) {
new said[31] 
new cmd[10] 
new target[9] 
new amount[7] 
new rest[5] 
 
if(id <= 0 || id < 32)	 
read_args(said, 30) 
replace(said, 30, "^"", "") 
parse(said, cmd,9, target,8, amount,6, rest,4) 
 
if (equal(cmd, "/przelej", 9)) {
new player = cmd_target(id,target,8) 
new name[33] 
new name2[33]
get_user_name(id,name,32) 
get_user_name(player,name2,32)		
new team[32] 
new team2[32] 
get_user_team(id,team,32) 
get_user_team(player,team2,32) 
new money = cs_get_user_money(id)
new money2 = cs_get_user_money(player) 
new cash = str_to_num(amount) 
new bool:NoCantDo
NoCantDo=false
 
if (!is_user_alive(id)) { 
		if (get_cvar_num("mt_cashdead")==0) { 
			client_print(id,print_center,"Nie mozesz przelewewac kiedy jestes martwy")
			NoCantDo=true
		} 
	} 
if (!is_user_alive(player)) { 
		if (get_cvar_num("mt_cashdead")==0) {
				client_print(id,print_chat,"Nie mozesz przelac do martwego gracza")
				NoCantDo=true
		} 
	} 
if (equal(name, name2)) { 
				client_print(id,print_center,"Nie mozesz przelac sobie pieniedzy.")
				NoCantDo=true
		} 
if (!equal(team, team2)) { 
		if (get_cvar_num("mt_cashteam")==0) { 
				client_print(id,print_center,"Nie mozesz przelac do przeciwnika")
				NoCantDo=true
		} 
	} 
if ((money2 + cash) > 16000) { 
				client_print(id,print_center,"%s ma za duzo pieniedzy",name2)
				NoCantDo=true
			} 
if (money < cash) { 
				client_print(id,print_center,"Nie posiadasz tylu pieniedzy") 
				NoCantDo=true
			} 
if (cash < 0) { 
		if (get_cvar_num("mt_cashsteal")==0) {
				client_print(id,print_center,"Nie mozesz ukrasc %s pieniedzy",name2)
				NoCantDo=true
			} 
	}
if (!NoCantDo) {
 
		cs_set_user_money(id, money - cash,1) 
		cs_set_user_money(player, money2 + cash,1) 
		ColorChat(0,GREEN,"^x04%s ^x01przelal ^x03%i^x04$^x01 do ^x04%s",name,cash,name2)
		}
	} 
return PLUGIN_CONTINUE 
}