hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2024.04.26. 06:28



Jelenlévő felhasználók

Jelenleg 292 felhasználó van jelen :: 1 regisztrált, 0 rejtett és 291 vendég

A legtöbb felhasználó (1565 fő) 2020.11.21. 11:26-kor tartózkodott itt.

Regisztrált felhasználók: Bing [Bot] az elmúlt 5 percben aktív felhasználók alapján

Utoljára aktív
Ahhoz hogy lásd ki volt utoljára aktív, be kell jelentkezned.



Az oldal teljeskörű
használatához regisztrálj.

Regisztráció

Kereső


Új téma nyitása  Hozzászólás a témához  [ 5 hozzászólás ] 
Szerző Üzenet
 Hozzászólás témája: Xp plugin kivétele a pluginból
HozzászólásElküldve: 2014.04.03. 18:39 
Offline
Tud valamit

Csatlakozott: 2013.02.02. 10:59
Hozzászólások: 104
Megköszönt másnak: 7 alkalommal
Megköszönték neki: 1 alkalommal
Valaki meg tudná nekem oldani légyszives hogy ugy átirja a plugint hogy ne kelljen hozzá a xpmod plugin tehat semmi xp-s dolog ne legyen benne előre is köszönöm :)


Csatolmányok:
VIP_HideNSeek (2).sma [19.89 KiB]
Letöltve 71 alkalommal.

_________________
Megköszöni valamit sose szégyen!!!
Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Xp plugin kivétele a pluginból
HozzászólásElküldve: 2014.04.04. 14:47 
Offline
Tud valamit

Csatlakozott: 2013.02.02. 10:59
Hozzászólások: 104
Megköszönt másnak: 7 alkalommal
Megköszönték neki: 1 alkalommal
Kérekszépen valakit csinálja meg :/

_________________
Megköszöni valamit sose szégyen!!!


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Xp plugin kivétele a pluginból
HozzászólásElküldve: 2014.04.04. 15:37 
Offline
Tiszteletbeli
Avatar

Csatlakozott: 2011.08.15. 14:42
Hozzászólások: 1345
Megköszönt másnak: 10 alkalommal
Megköszönték neki: 277 alkalommal
nem értek hozzá, de szerintem az megoldaná a gondot, ha a következő cvarokat 0 érteékre állítod
vip_xpcost 0
vip_xpamount 0
végülis kinullázod az xp-s tagokat... nem tudom, ötlet

_________________
Üdvözlettel: BBk
[AmxModX] Általam fordított pluginok
Death of Legend Fun Server History
NetMozi.com - Filmes fórum Badboy.killer
foximaxi


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Xp plugin kivétele a pluginból
HozzászólásElküldve: 2014.04.04. 20:28 
Offline
Tud valamit

Csatlakozott: 2013.02.02. 10:59
Hozzászólások: 104
Megköszönt másnak: 7 alkalommal
Megköszönték neki: 1 alkalommal
de ez nekem ugy kéne hogy a xp plugin mar bent se lenne a szerveren de akk nem loadol be a plugin

_________________
Megköszöni valamit sose szégyen!!!


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Xp plugin kivétele a pluginból
HozzászólásElküldve: 2014.04.04. 20:38 
Offline
Őskövület
Avatar

Csatlakozott: 2012.03.22. 18:22
Hozzászólások: 2978
Megköszönt másnak: 115 alkalommal
Megköszönték neki: 368 alkalommal
próbáld meg:

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <hamsandwich>
  4. #include <fun>
  5. #include <cstrike>
  6. #include <colorchat>
  7.  
  8. #define PLUGIN "HideNSeek VIP Mod"
  9. #define AUTHOR "HBxander"
  10. #define VERSION "1.4"
  11.  
  12. new vipinfo[] = "vip_info.txt";
  13. new vipprices[] = "vip_price.txt";
  14.  
  15. static const COLOR[] = "^x04"
  16.  
  17. new enable_Weapons;
  18. new enable_Items;
  19. new enable_Grenades;
  20. new g_iMoney[33];
  21.  
  22. new clantac;
  23. new awp_cost;
  24. new deagle_cost;
  25. new shotgun_cost;
  26. new fiveseven_cost;
  27. new hegren_cost;
  28. new respawn_cost;
  29. new colt_cost;
  30. new hp_amount;
  31. new hp_cost;
  32. new scout_cost;
  33. new frost_cost;
  34.  
  35. new bought_respawn;
  36. new bought_hp;
  37. new gMaxPlayers;
  38. new bool:gbConnected[33];
  39. new bool:got_access[33]
  40.  
  41. public plugin_init()
  42. {
  43. register_clcmd("say /vip", "show_VIPHowTo");
  44. register_clcmd("say /vips", "print_vips");
  45. register_clcmd("say /vs", "vip_shop");
  46. register_clcmd("say /vipshop", "vip_shop");
  47. register_clcmd("say /vshop", "vip_shop");
  48. register_clcmd("say_team /vs", "vip_shop");
  49. register_clcmd("say_team /vipshop", "vip_shop");
  50. register_clcmd("say_team /vshop", "vip_shop");
  51.  
  52. //enable stuff
  53. enable_Weapons = register_cvar("vip_weapons", "1");
  54. enable_Items = register_cvar("vip_items", "1");
  55. enable_Grenades = register_cvar("vip_grenades", "1");
  56. //weapons price
  57. awp_cost = register_cvar("vip_awpcost", "16000");
  58. deagle_cost = register_cvar("vip_dglcost", "12000");
  59. shotgun_cost = register_cvar("vip_m3cost", "12000");
  60. fiveseven_cost = register_cvar("vip_fivesevencost", "8000");
  61. colt_cost = register_cvar("vip_coltcost", "8000");
  62. scout_cost = register_cvar("vip_scoutcost", "3000");
  63. //grenades price
  64. hegren_cost = register_cvar("vip_hegrencost", "8000");
  65. frost_cost = register_cvar("vip_frostcost", "12000");
  66. //items price
  67. respawn_cost = register_cvar("vip_respawncost", "10000");
  68. hp_cost = register_cvar("vip_hpcost", "6000"); hp_amount = register_cvar("vip_hpamount", "25");
  69. //clantac
  70. clantac = register_cvar("vip_clantac", "YourClanTac");
  71.  
  72. gMaxPlayers = get_maxplayers();
  73. }
  74.  
  75. public vip_shop(id)
  76. {
  77. new MainMenu = menu_create("\rVIP Mod^n^nMain Menu", "MainMenu_Handle");
  78.  
  79. menu_additem(MainMenu, "\wInfo", "\r1", 0);
  80. menu_additem(MainMenu, "\wPrices", "\r2", 0);
  81. menu_addblank(MainMenu, 0);
  82. if ( get_pcvar_num(enable_Weapons) == 1 )
  83. {
  84. menu_additem(MainMenu, "\wWeapon Menu", "\r3", 0);
  85. }
  86. if ( get_pcvar_num(enable_Items) == 1 )
  87. {
  88. menu_additem(MainMenu, "\wItem Menu", "\r4", 0);
  89. }
  90. if ( get_pcvar_num(enable_Grenades) == 1 )
  91. {
  92. menu_additem(MainMenu, "\wGrenades Menu", "\r5", 0);
  93. }
  94. menu_setprop(MainMenu, MPROP_EXIT, MEXIT_ALL);
  95. if ( got_access[id] )
  96. {
  97. menu_display(id, MainMenu, 0);
  98. }
  99. }
  100.  
  101. public MainMenu_Handle(id, menu, item)
  102. {
  103. if (item == MENU_EXIT)
  104. {
  105. menu_destroy(menu);
  106. return PLUGIN_HANDLED;
  107. }
  108.  
  109. new data[6], iName[64];
  110. new access, callback;
  111.  
  112. menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);
  113. new key = str_to_num(data);
  114.  
  115. switch(key)
  116. {
  117. case 1:
  118. {
  119. show_motd(id, vipinfo, "VIP Info");
  120. }
  121. case 2:
  122. {
  123. show_motd(id, vipprices, "VIP Prices");
  124. }
  125. case 3:
  126. {
  127. weapon_Menu(id);
  128. }
  129. case 4:
  130. {
  131. item_Menu(id);
  132. }
  133. case 5:
  134. {
  135. grenades_Menu(id);
  136. }
  137. }
  138. return PLUGIN_CONTINUE;
  139. }
  140. public grenades_Menu(id)
  141. {
  142. new buy_hegren[60];
  143. new buy_frost[60];
  144.  
  145. formatex(buy_hegren, sizeof(buy_hegren) - 1, "\wHeGrenade \r[Amount: \w1\r] \r[$\y%i\r]", get_pcvar_num(hegren_cost));
  146. formatex(buy_frost, sizeof(buy_frost) - 1, "\wFrostGrenade \r[Amount: \w1\r] \r[$\y%i\r]", get_pcvar_num(frost_cost));
  147.  
  148. new gren_Menu = menu_create("\rVIP Mod^n^nItem Menu", "ItemMenu_Handle");
  149.  
  150. menu_additem(gren_Menu, buy_hegren, "\r1", 0);
  151. if ( cs_get_user_team(id) == CS_TEAM_T )
  152. {
  153. menu_additem(gren_Menu, buy_frost, "\r2", 0);
  154. }
  155. menu_setprop(gren_Menu, MPROP_EXIT, MEXIT_ALL);
  156. {
  157. menu_display(id, gren_Menu, 0);
  158. }
  159. }
  160.  
  161. public GrenadesMenu_Handle(id, menu, item)
  162. {
  163. if (item == MENU_EXIT)
  164. {
  165. menu_destroy(menu);
  166. return PLUGIN_HANDLED;
  167. }
  168.  
  169. new data[6], iName[64];
  170. new access, callback;
  171.  
  172. menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);
  173. new key = str_to_num(data);
  174.  
  175. switch(key)
  176. {
  177. case 1:
  178. {
  179. if ( cs_get_user_money(id) < get_pcvar_num(hegren_cost) )
  180. {
  181. ColorChat(id, GREEN, "[%s] VIP Mod:^x01 You dont have enough money to buy`x04 He Grenade^x01!", clantac);
  182. return PLUGIN_HANDLED;
  183. }
  184.  
  185. if ( !is_user_alive(id) )
  186. {
  187. ColorChat(id, GREEN, "[%s] VIP Mod:^x01 You need to be^x04 alive^x01!", clantac);
  188. return PLUGIN_HANDLED;
  189. }
  190.  
  191. if ( user_has_weapon(id, CSW_HEGRENADE) )
  192. {
  193. ColorChat(id, GREEN, "[%s] VIP Mod:^x01 You already own the^x04 He Grenade^x01!", clantac);
  194. return PLUGIN_HANDLED;
  195. }
  196. new name[32];
  197. get_user_name(id, name, 32);
  198. cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(hegren_cost));
  199. cs_set_weapon_ammo( give_item(id, "weapon_hegren"), 0);
  200. cs_set_user_bpammo(id, CSW_HEGRENADE, (cs_get_user_bpammo(id, CSW_HEGRENADE) + 1));
  201. ColorChat(0, GREEN, "[%s] VIP Mod:^x01 '%s' bought the^x04 He Grenade^x01 [$%i]", clantac, name, get_pcvar_num(hegren_cost));
  202. }
  203. case 2:
  204. {
  205. if ( cs_get_user_money(id) < get_pcvar_num(frost_cost) )
  206. {
  207. ColorChat(id, GREEN, "[%s] VIP Mod:^x01 You dont have enough money to buy`x04 Frost Grenade^x01!", clantac);
  208. return PLUGIN_HANDLED;
  209. }
  210.  
  211. if ( !is_user_alive(id) )
  212. {
  213. ColorChat(id, GREEN, "[%s] VIP Mod:^x01 You need to be ^x04alive^x01!", clantac);
  214. return PLUGIN_HANDLED;
  215. }
  216.  
  217. if ( user_has_weapon(id, CSW_SMOKEGRENADE) )
  218. {
  219. ColorChat(id, GREEN, "[%s] VIP Mod:^x01 You already own the^x04 Frost Grenade^x01!", clantac);
  220. return PLUGIN_HANDLED;
  221. }
  222. new name[32];
  223. get_user_name(id, name, 32);
  224. cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(frost_cost));
  225. cs_set_weapon_ammo( give_item(id, "weapon_sgren"), 0);
  226. cs_set_user_bpammo(id, CSW_SMOKEGRENADE, (cs_get_user_bpammo(id, CSW_SMOKEGRENADE) + 1));
  227. ColorChat(0, GREEN, "[%s] VIP Mod:^x01 '%s' bought the^x04 Frost Grenade^x01 [$%i]", clantac, name, get_pcvar_num(frost_cost));
  228. }
  229. }
  230. return PLUGIN_CONTINUE;
  231. }
  232. public TaskRespawn(id)
  233. {
  234. if ( cs_get_user_money(id) < get_pcvar_num(respawn_cost) )
  235. {
  236. ColorChat(id, GREEN, "[%s] VIP Mod:^x01 You dont have enough money to buy this item!", clantac);
  237. return PLUGIN_HANDLED;
  238. }
  239. if ( bought_respawn == 1 )
  240. {
  241. ColorChat(id, GREEN, "[%s] VIP Mod:^x01 You have already bought respawn this round!", clantac);
  242. return PLUGIN_HANDLED;
  243. }
  244. if ( is_user_alive(id) )
  245. {
  246. ColorChat(id, GREEN, "[%s] VIP Mod:^x01 You cannot buy respawn while your alive!", clantac);
  247. return PLUGIN_HANDLED;
  248. }
  249. new name[32];
  250. get_user_name(id, name, 32);
  251. cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(respawn_cost) );
  252. ExecuteHamB(Ham_CS_RoundRespawn, id);
  253. ColorChat(0, GREEN, "[%s] VIP Mod:^x01 '%s' bought respawn!", clantac, name);
  254. bought_respawn = 1;
  255.  
  256. return PLUGIN_HANDLED;
  257. }
  258.  
  259. public weapon_Menu(id)
  260. {
  261. new buy_awp[60];
  262. new buy_deagle[60];
  263. new buy_shotgun[60];
  264. new buy_colt[60];
  265. new buy_fiveseven[60];
  266. new buy_scout[60];
  267.  
  268. formatex(buy_awp, sizeof(buy_awp) - 1, "\wAWP \r[Bullets: \w1\r] \r[$\y%i\r]", get_pcvar_num(awp_cost));
  269. formatex(buy_deagle, sizeof(buy_deagle) - 1, "\wDeagle \r[Bullets: \w1\r] \r[$\y%i\r]", get_pcvar_num(deagle_cost));
  270. formatex(buy_shotgun, sizeof(buy_shotgun) - 1, "\wShotGun \r[Bullets: \w1\r] \r[$\y%i\r]", get_pcvar_num(shotgun_cost));
  271. formatex(buy_colt, sizeof(buy_colt) - 1, "\wColt \r[Bullets: \w1\r] \r[$\y%i\r]", get_pcvar_num(colt_cost));
  272. formatex(buy_fiveseven, sizeof(buy_fiveseven) - 1, "\wFiveSeven \r[Bullets: \w2\r] \r[$\y%i\r]", get_pcvar_num(fiveseven_cost));
  273. formatex(buy_scout, sizeof(buy_scout) - 1, "\wScout \r[Bullets: \w0\r] \r[$\y%i\r]", get_pcvar_num(scout_cost));
  274. new wep_Menu = menu_create("\rVIP Mod^n^nWeapon Menu", "wepMenu_Handle");
  275.  
  276. menu_additem(wep_Menu, buy_awp, "\r1", 0);
  277. menu_additem(wep_Menu, buy_deagle, "\r2", 0);
  278. menu_additem(wep_Menu, buy_shotgun, "\r3", 0);
  279. menu_additem(wep_Menu, buy_colt, "\r4", 0);
  280. menu_additem(wep_Menu, buy_fiveseven, "\r5", 0);
  281. menu_additem(wep_Menu, buy_scout, "\r6", 0);
  282. menu_setprop(wep_Menu, MPROP_EXIT, MEXIT_ALL);
  283. {
  284. menu_display(id, wep_Menu, 0);
  285. }
  286. }
  287.  
  288. public wepMenu_Handle(id, menu, item)
  289. {
  290. if (item == MENU_EXIT)
  291. {
  292. menu_destroy(menu);
  293. return PLUGIN_HANDLED;
  294. }
  295.  
  296. new data[6], iName[64];
  297. new access, callback;
  298.  
  299. menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);
  300. new key = str_to_num(data);
  301.  
  302. switch(key)
  303. {
  304. case 1:
  305. {
  306. if ( cs_get_user_money(id) < get_pcvar_num(awp_cost) )
  307. {
  308. ColorChat(id, GREEN, "[%s] VIP Mod:^x01 You dont have enough money to buy this item!", clantac);
  309. return PLUGIN_HANDLED;
  310. }
  311.  
  312. if ( !is_user_alive(id) )
  313. {
  314. ColorChat(id, GREEN, "[%s] VIP Mod:^x01 You need to be alive!", clantac);
  315. return PLUGIN_HANDLED;
  316. }
  317.  
  318. if ( user_has_weapon(id, CSW_AWP) )
  319. {
  320. ColorChat(id, GREEN, "[%s] VIP Mod:^x01 You already own this weapon!", clantac);
  321. return PLUGIN_HANDLED;
  322. }
  323.  
  324. new name[32];
  325. get_user_name(id, name, 32)
  326. cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(awp_cost) );
  327. cs_set_weapon_ammo( give_item(id, "weapon_awp"), 1);
  328. ColorChat(0, GREEN, "[%s] VIP Mod:^x01 '%s' bought the^x04 AWP^x01 [$%i]", clantac, name, get_pcvar_num(awp_cost));
  329.  
  330. }
  331. case 2:
  332. {
  333. if ( cs_get_user_money(id) < get_pcvar_num(deagle_cost) )
  334. {
  335. ColorChat(id, GREEN, "[%s] VIP Mod:^x01 You dont have enough money to buy this item!", clantac);
  336. return PLUGIN_HANDLED;
  337. }
  338.  
  339. if ( !is_user_alive(id) )
  340. {
  341. ColorChat(id, GREEN, "[%s] VIP Mod:^x01 You need to be alive!", clantac);
  342. return PLUGIN_HANDLED;
  343. }
  344.  
  345. if ( user_has_weapon(id, CSW_DEAGLE) )
  346. {
  347. ColorChat(id, GREEN, "[%s] VIP Mod:^x01 You already own this weapon!", clantac);
  348. return PLUGIN_HANDLED;
  349. }
  350.  
  351. new name[32];
  352. get_user_name(id, name, 32)
  353. cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(deagle_cost));
  354. cs_set_weapon_ammo( give_item(id, "weapon_deagle"), 1);
  355. ColorChat(0, GREEN, "[%s] VIP Mod:^x01 '%s' bought the^x04 Deagle^x01 [$%i]", clantac, name, get_pcvar_num(deagle_cost));
  356. }
  357. case 3:
  358. {
  359. if ( cs_get_user_money(id) < get_pcvar_num(shotgun_cost) )
  360. {
  361. ColorChat(id, GREEN, "[%s] VIP Mod:^x01 You dont have enough money to buy this item!", clantac);
  362. return PLUGIN_HANDLED;
  363. }
  364.  
  365. if ( !is_user_alive(id) )
  366. {
  367. ColorChat(id, GREEN, "[%s] VIP Mod:^x01 You need to be alive!", clantac);
  368. return PLUGIN_HANDLED;
  369. }
  370.  
  371. if ( user_has_weapon(id, CSW_M3) )
  372. {
  373. ColorChat(id, GREEN, "[%s] VIP Mod:^x01 You already own this weapon!", clantac);
  374. return PLUGIN_HANDLED;
  375. }
  376. new name[32];
  377. get_user_name(id, name, 32);
  378. cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(shotgun_cost));
  379. cs_set_weapon_ammo( give_item(id, "weapon_shotgun"), 1);
  380. ColorChat(0, GREEN, "[%s] VIP Mod:^x01 '%s' bought the^x04 ShotGun^x01 [$%i]", clantac, name, get_pcvar_num(shotgun_cost));
  381. }
  382. case 4:
  383. {
  384. if ( cs_get_user_money(id) < get_pcvar_num(colt_cost) )
  385. {
  386. ColorChat(id, GREEN, "[%s] VIP Mod:^x01 You dont have enough money to buy this item!", clantac);
  387. return PLUGIN_HANDLED;
  388. }
  389.  
  390. if ( !is_user_alive(id) )
  391. {
  392. ColorChat(id, GREEN, "[%s] VIP Mod:^x01 You need to be alive!", clantac);
  393. return PLUGIN_HANDLED;
  394. }
  395.  
  396. if ( user_has_weapon(id, CSW_M4A1) )
  397. {
  398. ColorChat(id, GREEN, "[%s] VIP Mod:^x01 You already own this weapon!", clantac);
  399. return PLUGIN_HANDLED;
  400. }
  401. new name[32];
  402. get_user_name(id, name, 32);
  403. cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(colt_cost));
  404. cs_set_weapon_ammo( give_item(id, "weapon_m4a1"), 1);
  405. ColorChat(0, GREEN, "[%s] VIP Mod:^x01 '%s' bought the^x04 Colt^x01 [$%i]", clantac, name, get_pcvar_num(colt_cost));
  406. }
  407. case 5:
  408. {
  409. if ( cs_get_user_money(id) < get_pcvar_num(fiveseven_cost) )
  410. {
  411. ColorChat(id, GREEN, "[%s] VIP Mod:^x01 You dont have enough money to buy this item!", clantac);
  412. return PLUGIN_HANDLED;
  413. }
  414.  
  415. if ( !is_user_alive(id) )
  416. {
  417. ColorChat(id, GREEN, "[%s] VIP Mod:^x01 You need to be alive!", clantac);
  418. return PLUGIN_HANDLED;
  419. }
  420.  
  421. if ( user_has_weapon(id, CSW_FIVESEVEN) )
  422. {
  423. ColorChat(id, GREEN, "[%s] VIP Mod:^x01 You already own this weapon!", clantac);
  424. return PLUGIN_HANDLED;
  425. }
  426. new name[32];
  427. get_user_name(id, name, 32);
  428. cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(fiveseven_cost));
  429. cs_set_weapon_ammo( give_item(id, "weapon_fiveseven"), 2 );
  430. ColorChat(0, GREEN, "[%s] VIP Mod:^x01 '%s' bought the^x04 FiveSeven^x01 [$%i]", clantac, name, get_pcvar_num(fiveseven_cost));
  431. }
  432. case 6:
  433. {
  434. if ( cs_get_user_money(id) < get_pcvar_num(scout_cost) )
  435. {
  436. ColorChat(id, GREEN, "[%s] VIP Mod:^x01 You dont have enough money to buy this item!", clantac);
  437. return PLUGIN_HANDLED;
  438. }
  439.  
  440. if ( !is_user_alive(id) )
  441. {
  442. ColorChat(id, GREEN, "[%s] VIP Mod:^x01 You need to be alive!", clantac);
  443. return PLUGIN_HANDLED;
  444. }
  445.  
  446. if ( user_has_weapon(id, CSW_SCOUT) )
  447. {
  448. ColorChat(id, GREEN, "[%s] VIP Mod:^x01 You already own this weapon!", clantac);
  449. return PLUGIN_HANDLED;
  450. }
  451. new name[32];
  452. get_user_name(id, name, 32);
  453. cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(scout_cost));
  454. cs_set_weapon_ammo( give_item(id, "weapon_scout"), 0);
  455. ColorChat(0, GREEN, "[%s] VIP Mod:^x01 '%s' bought the^x04 Scout^x01 [$%i]", clantac, name, get_pcvar_num(scout_cost));
  456. }
  457. }
  458. return PLUGIN_CONTINUE;
  459. }
  460.  
  461. public item_Menu(id)
  462. {
  463. new buy_respawn[60];
  464. new buy_xp[60];
  465. new buy_hp[60];
  466.  
  467. formatex(buy_respawn, sizeof(buy_respawn) - 1, "\wRespawn \r[$\y%i\r]", get_pcvar_num(respawn_cost));
  468. formatex(buy_hp, sizeof(buy_hp) - 1, "\w%i HP \r[$\y%i\r]", get_pcvar_num(shotgun_cost));
  469.  
  470. new ite_Menu = menu_create("\rVIP Mod^n^nItem Menu", "ItemMenu_Handle");
  471.  
  472. menu_additem(ite_Menu, buy_respawn, "\r1", 0);
  473. menu_additem(ite_Menu, buy_xp, "\r2", 0);
  474. menu_additem(ite_Menu, buy_hp, "\r3", 0);
  475. menu_setprop(ite_Menu, MPROP_EXIT, MEXIT_ALL);
  476. {
  477. menu_display(id, ite_Menu, 0);
  478. }
  479. }
  480.  
  481. public ItemMenu_Handle(id, menu, item)
  482. {
  483. if (item == MENU_EXIT)
  484. {
  485. menu_destroy(menu);
  486. return PLUGIN_HANDLED;
  487. }
  488.  
  489. new data[6], iName[64];
  490. new access, callback;
  491.  
  492. menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);
  493. new key = str_to_num(data);
  494.  
  495. switch(key)
  496. {
  497. case 1:
  498. {
  499. set_task(0.2, "TaskRespawn", id);
  500. }
  501. case 3:
  502. {
  503. if ( cs_get_user_money(id) < get_pcvar_num(hp_cost) )
  504. {
  505. ColorChat(id, GREEN, "[%s] VIP Mod:^x01 You dont have enough money to buy this item!", clantac);
  506. return PLUGIN_HANDLED;
  507. }
  508. if ( bought_hp == 1 )
  509. {
  510. ColorChat(id, GREEN, "[%s] VIP Mod:^x01 You have already bought^x04 HP^x01 this round!", clantac);
  511. return PLUGIN_HANDLED;
  512. }
  513. new name[32];
  514. get_user_name(id, name, 32);
  515. cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(hp_cost));
  516. ColorChat(0, GREEN, "[%s] VIP Mod:^x01 '%s' bought^x04 %i^x01 more HP!", clantac, name, get_pcvar_num(hp_amount));
  517. new health = get_user_health(id);
  518. health += get_pcvar_num(hp_amount);
  519. }
  520. }
  521. return PLUGIN_CONTINUE;
  522. }
  523.  
  524. public client_authorized(id)
  525. {
  526. gbConnected[id] = true;
  527.  
  528. if ( access(id, ADMIN_LEVEL_A) )
  529. {
  530. got_access[id] = true;
  531. }
  532. }
  533.  
  534. public client_disconnect(id)
  535. {
  536. gbConnected[id] = false;
  537. if ( got_access[id] )
  538. {
  539. got_access[id] = false;
  540. }
  541. }
  542.  
  543. public client_putinserver(id)
  544. {
  545. set_task(5.0, "Task_LogonMessage", id);
  546. g_iMoney[ id ] = -1;
  547. }
  548.  
  549. public FwdPlayerSpawn(id)
  550. {
  551. if( !gbConnected[id] )
  552. return HAM_IGNORED;
  553.  
  554. bought_respawn = 0;
  555. bought_hp = 0;
  556. return HAM_HANDLED;
  557. }
  558.  
  559. public show_VIPHowTo(id)
  560. {
  561. show_motd(id, "extras/ultimate_vip.motd", "How To Get VIP");
  562. }
  563.  
  564. public Task_LogonMessage(id)
  565. {
  566. ColorChat(id, GREEN, "[%s] VIP Mod:^x01 Checking status for^x04 VIP^x01...", clantac);
  567. if ( got_access[id] )
  568. {
  569. ColorChat(id, GREEN, "[%s] VIP Mod:^x01 Error logging in as^x04 VIP^x01!", clantac);
  570. ColorChat(id, GREEN, "[%s] VIP Mod:^x01 Reason: You havent bought^x04 VIP^x01 yet!", clantac);
  571. ColorChat(id, GREEN, "[%s] VIP Mod:^x01 Type^x04 /vip^x01 to see how to buy^x04 VIP^x01!", clantac);
  572. }
  573. else
  574. {
  575. ColorChat(id, GREEN, "[%s] VIP Mod:^x01 Logged in as^x04 VIP^x01!", clantac);
  576. ColorChat(id, GREEN, "[%s] VIP Mod:^x01 Type^x04 /vs^x01 or^x04 /vshop^x01 to use^x04 VIP^x01!", clantac);
  577. ColorChat(0, GREEN, "[%s] VIP Mod:^x01 A new^x04 VIP^x01 has logged in! - Type^x04 /vips^x01 to see all^x04 VIPs^x01!", clantac);
  578. }
  579. }
  580.  
  581. F_Print(id, const sMsg[], any:...)
  582. {
  583. static i; i = id ? id : get_User();
  584. if ( !i ) return;
  585.  
  586. new sMessage[256];
  587. new len = formatex(sMessage, sizeof(sMessage) - 1, "^x04^x03 ");
  588. vformat(sMessage[len], sizeof(sMessage) - 1 - len, sMsg, 3);
  589. sMessage[192] = '^0';
  590.  
  591. static msgid_SayText;
  592. if ( !msgid_SayText ) msgid_SayText = get_user_msgid("SayText");
  593.  
  594. new const team_Names[][] =
  595. {
  596. "",
  597. "TERRORIST",
  598. "CT",
  599. "SPECTATOR"
  600. };
  601.  
  602. new sTeam = get_user_team(i);
  603.  
  604. team_Info(i, id, team_Names[0]);
  605.  
  606. message_begin(id ? MSG_ONE_UNRELIABLE : MSG_BROADCAST, msgid_SayText, _, id);
  607. write_byte(i);
  608. write_string(sMessage);
  609. message_end();
  610.  
  611. team_Info(i, id, team_Names[sTeam]);
  612. }
  613.  
  614. team_Info(receiver, sender, sTeam[])
  615. {
  616. static msgid_TeamInfo;
  617. if ( !msgid_TeamInfo ) msgid_TeamInfo = get_user_msgid("TeamInfo");
  618.  
  619. message_begin(sender ? MSG_ONE_UNRELIABLE : MSG_BROADCAST, msgid_TeamInfo, _, sender);
  620. write_byte(receiver);
  621. write_string(sTeam);
  622. message_end();
  623. }
  624.  
  625.  
  626. get_User()
  627. {
  628. for ( new id = 1; id <= gMaxPlayers; id++ )
  629. {
  630. if ( gbConnected[id] )
  631. {
  632. return id;
  633. }
  634. }
  635.  
  636. return 0;
  637. }
  638. public print_vips(id2)
  639. {
  640. new vipnames[33][32]
  641. new message[256]
  642. new id, count, x, len
  643.  
  644. for(id = 1 ; id <= gMaxPlayers ; id++)
  645. if(is_user_connected(id))
  646. if( got_access[id] )
  647. get_user_name(id, vipnames[count++], 31)
  648.  
  649. len = format(message, 255, "%s VIPs ONLINE: ",COLOR)
  650. if(count > 0) {
  651. for(x = 0 ; x < count ; x++) {
  652. len += format(message[len], 255-len, "%s%s ", vipnames[x], x < (count-1) ? ", ":"")
  653. if(len > 96 ) {
  654. F_Print(id2, message)
  655. len = format(message, 255, "%s ",COLOR)
  656. }
  657. }
  658. F_Print(id2, message)
  659. }
  660. else {
  661. len += format(message[len], 255-len, "No VIPs online.")
  662. F_Print(id2, message);
  663. }
  664.  
  665. new info_ifnot[64];
  666. format(info_ifnot, 63, "%s Contact Server Admin -- %s", COLOR)
  667. F_Print(id2, info_ifnot);
  668. }
  669.  

_________________
Blasenkampfwagen

https://discord.gg/uBYnNnZP
GTA:PURSUIT MTA

Ők köszönték meg ultraibolya nek ezt a hozzászólást: Scremo (2014.04.06. 17:52)
  Népszerűség: 2.27%


Hozzászólás jelentése
Vissza a tetejére
   
Hozzászólások megjelenítése:  Rendezés  
Új téma nyitása  Hozzászólás a témához  [ 5 hozzászólás ] 


Ki van itt

Jelenlévő fórumozók: nincs regisztrált felhasználó valamint 11 vendég


Nyithatsz új témákat ebben a fórumban.
Válaszolhatsz egy témára ebben a fórumban.
Nem szerkesztheted a hozzászólásaidat ebben a fórumban.
Nem törölheted a hozzászólásaidat ebben a fórumban.
Nem küldhetsz csatolmányokat ebben a fórumban.

Keresés:
Ugrás:  
Powered by phpBB® Forum Software © phpBB Limited
Magyar fordítás © Magyar phpBB Közösség
Portal: Kiss Portal Extension © Michael O'Toole