hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2024.03.29. 00:31



Jelenlévő felhasználók

Jelenleg 232 felhasználó van jelen :: 2 regisztrált, 1 rejtett és 229 vendég

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

Regisztrált felhasználók: Google [Bot], quil 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  [ 10 hozzászólás ] 
Szerző Üzenet
 Hozzászólás témája: 1 fegyver
HozzászólásElküldve: 2014.01.26. 21:20 
Offline
Nagyúr
Avatar

Csatlakozott: 2013.03.28. 20:32
Hozzászólások: 561
Megköszönt másnak: 59 alkalommal
Megköszönték neki: 56 alkalommal
Hello!
Van egy fegyvermenü plugin a szerveremen és ha a földön van egy fegyver azt felveszed és utána választasz a fegyvermenüből akkor megmarad az is és a választott fegyver is. Vagyis 2 fegyvere van.

_________________
Kép

[steam]alfaaaa[/steam]


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: 1 fegyver
HozzászólásElküldve: 2014.01.26. 21:52 
Offline
Tud valamit
Avatar

Csatlakozott: 2013.08.22. 10:48
Hozzászólások: 119
Megköszönt másnak: 33 alkalommal
Megköszönték neki: 3 alkalommal
alfanero írta:
Hello!
Van egy fegyvermenü plugin a szerveremen és ha a földön van egy fegyver azt felveszed és utána választasz a fegyvermenüből akkor megmarad az is és a választott fegyver is. Vagyis 2 fegyvere van.

Hali.
Oké, hogy 2 fegyvere van, de mit kell csinálni? Az a lényeg, hogy ha felvesz vmit, utána választ akkor csak a választott legyen? Ha igen, adj sma-t, és holnap megcsinálom.

_________________
STEAM:
[steam]thebvn[/steam]
FaceBook oldal
Dream Deathrun: CSATLAKOZÁS!


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: 1 fegyver
HozzászólásElküldve: 2014.01.27. 19:52 
Offline
Nagyúr
Avatar

Csatlakozott: 2013.03.28. 20:32
Hozzászólások: 561
Megköszönt másnak: 59 alkalommal
Megköszönték neki: 56 alkalommal
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <fun>
  3. #include <hamsandwich>
  4. #include <cstrike>
  5. #include <fakemeta>
  6.  
  7. const NETOLTS = ((1<<CSW_HEGRENADE)|(1<<CSW_SMOKEGRENADE)|(1<<CSW_FLASHBANG)|(1<<CSW_KNIFE)|(1<<CSW_C4))
  8.  
  9. new gWPCT;
  10. new gWPTE;
  11. new players[32]
  12. new numct
  13. new numt
  14. new const g_MaxAmmo[] =
  15. {
  16. 0,
  17. 52, //CSW_P228
  18. 0,
  19. 90, //CSW_SCOUT
  20. 0, //CSW_HEGRENADE
  21. 32, //CSW_XM1014
  22. 0, //CSW_C4
  23. 100,//CSW_MAC10
  24. 90, //CSW_AUG
  25. 0, //CSW_SMOKEGRENADE
  26. 120,//CSW_ELITE
  27. 100,//CSW_FIVESEVEN
  28. 100,//CSW_UMP45
  29. 90, //CSW_SG550
  30. 90, //CSW_GALIL
  31. 90, //CSW_FAMAS
  32. 100,//CSW_USP
  33. 120,//CSW_GLOCK18
  34. 30, //CSW_AWP
  35. 120,//CSW_MP5NAVY
  36. 200,//CSW_M249
  37. 32, //CSW_M3
  38. 90, //CSW_M4A1
  39. 120,//CSW_TMP
  40. 90, //CSW_G3SG1
  41. 0, //CSW_FLASHBANG
  42. 35, //CSW_DEAGLE
  43. 90, //CSW_SG552
  44. 90, //CSW_AK47
  45. 0, //CSW_KNIFE
  46. 100//CSW_P90
  47. }
  48. new orokloszer
  49.  
  50. public plugin_init()
  51. {
  52. register_plugin("FegyverMenu", "1.0", "RsN");
  53. RegisterHam(Ham_Spawn, "player", "FegyverMenu",1)
  54. register_event("CurWeapon" , "Event_CurWeapon" , "be" , "1=1" );
  55. orokloszer = register_cvar("fm_orokloszer","1")
  56. }
  57. public Event_CurWeapon(id)
  58. {
  59. if(get_pcvar_num(orokloszer) == 1)
  60. {
  61. if(is_user_alive(id))
  62. {
  63. new fegyver = read_data(2)
  64. if( !( NETOLTS & (1<<fegyver) ) )
  65. {
  66. cs_set_user_bpammo(id, fegyver, g_MaxAmmo[fegyver]);
  67. }
  68. }
  69. }
  70. }
  71. public FegyverMenu(id)
  72. {
  73. new CsTeams:userTeam = cs_get_user_team(id)
  74. if(user_has_weapon(id, CSW_C4))
  75. {
  76. strip_user_weapons(id)
  77. ham_strip_weapon(id,"weapon_glock18")
  78. give_item(id, "weapon_knife")
  79. give_item(id, "weapon_c4")
  80. cs_set_user_plant(id,1,1)
  81. new menu = menu_create("\yFegyverMenĂĽ", "FegyverMenu_mh");
  82. menu_additem(menu, "\yM4a1", "0", 0); // case 0
  83. menu_additem(menu, "\yAk47", "1", 0); // case 1
  84. menu_additem(menu, "\yAWP", "2", 0); // case 2
  85. menu_additem(menu, "\yFamas", "3", 0); // case 3
  86. menu_additem(menu, "\yM249", "4", 0); // case 4
  87. menu_additem(menu, "\yShotgun M3", "5", 0); // case 5
  88. menu_additem(menu, "\yShotgun Xm1014", "6", 0); // case 6
  89. menu_additem(menu, "\yScout", "7", 0); // case 7
  90. menu_additem(menu, "\yMp5navy", "8", 0); // case 8
  91. menu_additem(menu, "\yGalil", "9", 0); // case 9
  92. menu_additem(menu, "\yAug", "10", 0); // case 10
  93. menu_additem(menu, "\ySG552", "11", 0); // case 11
  94. menu_additem(menu, "\yP90", "12", 0); // case 12
  95. menu_additem(menu, "\yTMP", "13", 0); // case 13
  96. menu_additem(menu, "\yUMP45", "14", 0); // case 14
  97. menu_additem(menu, "\yMac10", "15", 0); // case 15
  98. menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
  99. menu_setprop(menu, MPROP_BACKNAME, "Vissza");
  100. menu_setprop(menu, MPROP_NEXTNAME, "Előre");
  101. menu_setprop(menu, MPROP_EXITNAME, "Kilép");
  102. menu_display(id, menu, 0);
  103. }
  104. else if (userTeam == CS_TEAM_CT)
  105. {
  106. strip_user_weapons(id)
  107. give_item(id, "weapon_knife")
  108. ham_strip_weapon(id,"weapon_glock18")
  109. new menu = menu_create("\yFegyverMenĂĽ", "FegyverMenu_mh");
  110. menu_additem(menu, "\yM4a1", "0", 0); // case 0
  111. menu_additem(menu, "\yAk47", "1", 0); // case 1
  112. menu_additem(menu, "\yAWP", "2", 0); // case 2
  113. menu_additem(menu, "\yFamas", "3", 0); // case 3
  114. menu_additem(menu, "\yM249", "4", 0); // case 4
  115. menu_additem(menu, "\yShotgun M3", "5", 0); // case 5
  116. menu_additem(menu, "\yShotgun Xm1014", "6", 0); // case 6
  117. menu_additem(menu, "\yScout", "7", 0); // case 7
  118. menu_additem(menu, "\yMp5navy", "8", 0); // case 8
  119. menu_additem(menu, "\yGalil", "9", 0); // case 9
  120. menu_additem(menu, "\yAug", "10", 0); // case 10
  121. menu_additem(menu, "\ySG552", "11", 0); // case 11
  122. menu_additem(menu, "\yP90", "12", 0); // case 12
  123. menu_additem(menu, "\yTMP", "13", 0); // case 13
  124. menu_additem(menu, "\yUMP45", "14", 0); // case 14
  125. menu_additem(menu, "\yMac10", "15", 0); // case 15
  126. menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
  127. menu_setprop(menu, MPROP_BACKNAME, "Vissza");
  128. menu_setprop(menu, MPROP_NEXTNAME, "Előre");
  129. menu_setprop(menu, MPROP_EXITNAME, "Kilép");
  130. menu_display(id, menu, 0);
  131. }
  132. else if (userTeam == CS_TEAM_T)
  133. {
  134. strip_user_weapons(id)
  135. ham_strip_weapon(id,"weapon_usp")
  136. give_item(id, "weapon_knife")
  137. give_item(id, "item_thighpack");
  138. new menu = menu_create("\yFegyverMenĂĽ", "FegyverMenu_mh");
  139. menu_additem(menu, "\yM4a1", "0", 0); // case 0
  140. menu_additem(menu, "\yAk47", "1", 0); // case 1
  141. menu_additem(menu, "\yAWP", "2", 0); // case 2
  142. menu_additem(menu, "\yFamas", "3", 0); // case 3
  143. menu_additem(menu, "\yM249", "4", 0); // case 4
  144. menu_additem(menu, "\yShotgun M3", "5", 0); // case 5
  145. menu_additem(menu, "\yShotgun Xm1014", "6", 0); // case 6
  146. menu_additem(menu, "\yScout", "7", 0); // case 7
  147. menu_additem(menu, "\yMp5navy", "8", 0); // case 8
  148. menu_additem(menu, "\yGalil", "9", 0); // case 9
  149. menu_additem(menu, "\yAug", "10", 0); // case 10
  150. menu_additem(menu, "\ySG552", "11", 0); // case 11
  151. menu_additem(menu, "\yP90", "12", 0); // case 12
  152. menu_additem(menu, "\yTMP", "13", 0); // case 13
  153. menu_additem(menu, "\yUMP45", "14", 0); // case 14
  154. menu_additem(menu, "\yMac10", "15", 0); // case 15
  155. menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
  156. menu_setprop(menu, MPROP_BACKNAME, "Vissza");
  157. menu_setprop(menu, MPROP_NEXTNAME, "Előre");
  158. menu_setprop(menu, MPROP_EXITNAME, "Kilép");
  159. menu_display(id, menu, 0);
  160. }
  161. }
  162. public FegyverMenu_mh(id, menu, item)
  163. {
  164. new command[6], name[64], access, callback;
  165. menu_item_getinfo(menu, item, access, command, sizeof command - 1, name, sizeof name - 1, callback);
  166. switch(item)
  167. {
  168. case 0:
  169. {
  170. give_item(id, "weapon_m4a1");
  171. give_item(id, "ammo_556nato");
  172. give_item(id, "ammo_556nato");
  173. give_item(id, "ammo_556nato");
  174. give_item(id, "weapon_knife");
  175. give_item(id, "item_assaultsuit")
  176. PistolMenu(id);
  177. }
  178. case 1:
  179. {
  180. give_item(id, "weapon_ak47");
  181. give_item(id, "ammo_762nato");
  182. give_item(id, "ammo_762nato");
  183. give_item(id, "ammo_762nato");
  184. give_item(id, "weapon_knife");
  185. give_item(id, "item_assaultsuit")
  186. PistolMenu(id);
  187. }
  188. case 2:
  189. {
  190. new CsTeams:userTeam = cs_get_user_team(id);
  191. if(numct >= 4 && numt >= 4)
  192. {
  193.  
  194. if(userTeam == CS_TEAM_CT)
  195. {
  196. if(gWPCT < 2)
  197. {
  198. give_item(id, "weapon_awp");
  199. give_item(id, "ammo_338magnum");
  200. give_item(id, "ammo_338magnum");
  201. give_item(id, "ammo_338magnum");
  202. give_item(id, "weapon_knife");
  203. give_item(id, "item_assaultsuit")
  204. PistolMenu(id);
  205.  
  206. {
  207. client_print(id, print_center, "Csak 2 ember wpzhet csapatonként!");
  208. fegyvermenu(id);
  209. }
  210. }
  211. }
  212. else
  213. {
  214. client_print(id, print_center, "Nincs meg a 4v4 így nem használhatod az AWP-t!")
  215. fegyvermenu(id)
  216. }
  217. }
  218. if(userTeam == CS_TEAM_T)
  219. {
  220. if(gWPTE < 2)
  221. {
  222. give_player_grenades(id);
  223. give_item(id, "weapon_knife");
  224. give_item(id, "weapon_awp");
  225. give_item(id, "weapon_deagle");
  226. give_item(id, "ammo_50ae");
  227. give_item(id, "ammo_50ae");
  228. give_item(id, "ammo_50ae");
  229. give_item(id, "ammo_338magnum");
  230. give_item(id, "ammo_338magnum");
  231. give_item(id, "ammo_338magnum");
  232. gWPTE++
  233. }
  234. else
  235. {
  236. client_print(id, print_center, "Csak 2 ember wpzhet csapatonként!");
  237. fegyvermenu(id);
  238. }
  239. }
  240. }
  241. else
  242. {
  243. client_print(id, print_center, "Nincs meg a 4v4 így nem használhatod az AWP-t!")
  244. fegyvermenu(id)
  245. }
  246.  
  247.  
  248. }
  249. case 3:
  250. {
  251. give_item(id, "weapon_famas");
  252. give_item(id, "ammo_556nato");
  253. give_item(id, "ammo_556nato");
  254. give_item(id, "ammo_556nato");
  255. give_item(id, "ammo_556nato");
  256. give_item(id, "weapon_knife");
  257. give_item(id, "item_assaultsuit")
  258. PistolMenu(id);
  259. }
  260. case 4:
  261. {
  262. give_item(id, "weapon_m249");
  263. give_item(id, "ammo_556nato");
  264. give_item(id, "ammo_556nato");
  265. give_item(id, "weapon_knife");
  266. give_item(id, "item_assaultsuit")
  267. PistolMenu(id);
  268. }
  269. case 5:
  270. {
  271. give_item(id, "weapon_m3");
  272. give_item(id, "ammo_buckshot");
  273. give_item(id, "ammo_buckshot");
  274. give_item(id, "ammo_buckshot");
  275. give_item(id, "weapon_knife");
  276. give_item(id, "item_assaultsuit")
  277. PistolMenu(id);
  278. }
  279. case 6:
  280. {
  281. give_item(id, "weapon_xm1014");
  282. give_item(id, "ammo_buckshot");
  283. give_item(id, "ammo_buckshot");
  284. give_item(id, "ammo_buckshot");
  285. give_item(id, "ammo_buckshot");
  286. give_item(id, "weapon_knife");
  287. give_item(id, "item_assaultsuit")
  288. PistolMenu(id);
  289. }
  290. case 7:
  291. {
  292. give_item(id, "weapon_scout");
  293. give_item(id, "ammo_762nato");
  294. give_item(id, "ammo_762nato");
  295. give_item(id, "ammo_762nato");
  296. give_item(id, "ammo_762nato");
  297. give_item(id, "ammo_762nato");
  298. give_item(id, "ammo_762nato");
  299. give_item(id, "ammo_762nato");
  300. give_item(id, "ammo_762nato");
  301. give_item(id, "ammo_762nato");
  302. give_item(id, "item_assaultsuit")
  303. PistolMenu(id);
  304. }
  305. case 8:
  306. {
  307. give_item(id, "weapon_mp5navy");
  308. give_item(id, "ammo_9mm");
  309. give_item(id, "ammo_9mm");
  310. give_item(id, "ammo_9mm");
  311. give_item(id, "ammo_9mm");
  312. give_item(id, "item_assaultsuit")
  313. PistolMenu(id);
  314. }
  315. case 9:
  316. {
  317. give_item(id, "weapon_galil");
  318. give_item(id, "ammo_556nato");
  319. give_item(id, "ammo_556nato");
  320. give_item(id, "ammo_556nato");
  321. give_item(id, "item_assaultsuit")
  322. PistolMenu(id);
  323. }
  324. case 10:
  325. {
  326. give_item(id, "weapon_aug");
  327. give_item(id, "ammo_556nato");
  328. give_item(id, "ammo_556nato");
  329. give_item(id, "ammo_556nato");
  330. give_item(id, "item_assaultsuit")
  331. PistolMenu(id);
  332. }
  333. case 11:
  334. {
  335. give_item(id, "weapon_sg552");
  336. give_item(id, "ammo_556nato");
  337. give_item(id, "ammo_556nato");
  338. give_item(id, "ammo_556nato");
  339. give_item(id, "item_assaultsuit")
  340. PistolMenu(id);
  341. }
  342. case 12:
  343. {
  344. give_item(id, "weapon_p90");
  345. give_item(id, "ammo_57mm");
  346. give_item(id, "ammo_57mm");
  347. give_item(id, "item_assaultsuit")
  348. PistolMenu(id);
  349. }
  350. case 13:
  351. {
  352. give_item(id, "weapon_tmp");
  353. give_item(id, "ammo_9mm");
  354. give_item(id, "ammo_9mm");
  355. give_item(id, "ammo_9mm");
  356. give_item(id, "ammo_9mm");
  357. give_item(id, "item_assaultsuit")
  358. PistolMenu(id);
  359. }
  360. case 14:
  361. {
  362. give_item(id, "weapon_ump45");
  363. give_item(id, "ammo_45acp");
  364. give_item(id, "ammo_45acp");
  365. give_item(id, "ammo_45acp");
  366. give_item(id, "ammo_45acp");
  367. give_item(id, "weapon_knife");
  368. give_item(id, "item_assaultsuit")
  369. PistolMenu(id);
  370. }
  371. case 15:
  372. {
  373. give_item(id, "weapon_mac10");
  374. give_item(id, "ammo_45acp");
  375. give_item(id, "ammo_45acp");
  376. give_item(id, "ammo_45acp");
  377. give_item(id, "ammo_45acp");
  378. give_item(id, "item_assaultsuit")
  379. PistolMenu(id);
  380. }
  381. }
  382.  
  383. menu_destroy(menu);
  384.  
  385. return PLUGIN_HANDLED;
  386. }
  387. public PistolMenu(id)
  388. {
  389. new menu = menu_create("\yPisztolyMenĂĽ", "PistolMenu_mh");
  390.  
  391. menu_additem(menu, "\yDeagle", "", 0); // case 0
  392. menu_additem(menu, "\yUsp", "", 0); // case 1
  393. menu_additem(menu, "\yGlock18", "", 0); // case 2
  394. menu_additem(menu, "\yP228", "", 0); // case 3
  395. menu_additem(menu, "\yFiveseven", "", 0); // case 4
  396. menu_additem(menu, "\yElite", "", 0); // case 5
  397.  
  398. menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
  399. menu_setprop(menu, MPROP_BACKNAME, "Vissza");
  400. menu_setprop(menu, MPROP_NEXTNAME, "Előre");
  401. menu_setprop(menu, MPROP_EXITNAME, "Kilép");
  402.  
  403. menu_display(id, menu, 0);
  404.  
  405. return PLUGIN_HANDLED;
  406. }
  407.  
  408. public PistolMenu_mh(id, menu, item)
  409. {
  410. if(item == MENU_EXIT)
  411. {
  412. menu_cancel(id);
  413. return PLUGIN_HANDLED;
  414. }
  415.  
  416. new command[6], name[64], access, callback;
  417.  
  418. menu_item_getinfo(menu, item, access, command, sizeof command - 1, name, sizeof name - 1, callback);
  419.  
  420. switch(item)
  421. {
  422. case 0:
  423. {
  424. give_item(id, "weapon_deagle");
  425. give_item(id,"ammo_50ae");
  426. give_item(id,"ammo_50ae");
  427. give_item(id,"ammo_50ae");
  428. give_item(id,"ammo_50ae");
  429. give_item(id,"ammo_50ae");
  430. give_item(id, "weapon_hegrenade");
  431. give_item(id, "weapon_flashbang");
  432. give_item(id, "weapon_flashbang");
  433. cs_set_user_bpammo(id, CSW_HEGRENADE, 1)
  434. }
  435. case 1:
  436. {
  437. give_item(id, "weapon_usp");
  438. give_item(id,"ammo_45acp");
  439. give_item(id,"ammo_45acp");
  440. give_item(id,"ammo_45acp");
  441. give_item(id,"ammo_45acp");
  442. give_item(id,"ammo_45acp");
  443. give_item(id,"ammo_45acp");
  444. give_item(id,"ammo_45acp");
  445. give_item(id,"ammo_45acp");
  446. give_item(id,"ammo_45acp");
  447. give_item(id, "weapon_hegrenade");
  448. give_item(id, "weapon_flashbang");
  449. give_item(id, "weapon_flashbang");
  450. cs_set_user_bpammo(id, CSW_HEGRENADE, 1)
  451. }
  452. case 2:
  453. {
  454. give_item(id, "weapon_glock18");
  455. give_item(id,"ammo_9mm");
  456. give_item(id,"ammo_9mm");
  457. give_item(id,"ammo_9mm");
  458. give_item(id,"ammo_9mm");
  459. give_item(id,"ammo_9mm");
  460. give_item(id,"ammo_9mm");
  461. give_item(id, "weapon_hegrenade");
  462. give_item(id, "weapon_flashbang");
  463. give_item(id, "weapon_flashbang");
  464. cs_set_user_bpammo(id, CSW_HEGRENADE, 1)
  465. }
  466. case 3:
  467. {
  468. give_item(id, "weapon_p228");
  469. give_item(id,"ammo_357sig");
  470. give_item(id,"ammo_357sig");
  471. give_item(id,"ammo_357sig");
  472. give_item(id,"ammo_357sig");
  473. give_item(id, "weapon_hegrenade");
  474. give_item(id, "weapon_flashbang");
  475. give_item(id, "weapon_flashbang");
  476. cs_set_user_bpammo(id, CSW_HEGRENADE, 1)
  477. }
  478. case 4:
  479. {
  480. give_item(id, "weapon_fiveseven");
  481. give_item(id,"ammo_57mm");
  482. give_item(id,"ammo_57mm");
  483. give_item(id,"ammo_57mm");
  484. give_item(id,"ammo_57mm");
  485. give_item(id,"ammo_57mm");
  486. give_item(id, "weapon_hegrenade");
  487. give_item(id, "weapon_flashbang");
  488. give_item(id, "weapon_flashbang");
  489. cs_set_user_bpammo(id, CSW_HEGRENADE, 1)
  490. }
  491. case 5:
  492. {
  493. give_item(id, "weapon_elite");
  494. give_item(id,"ammo_9mm");
  495. give_item(id,"ammo_9mm");
  496. give_item(id,"ammo_9mm");
  497. give_item(id,"ammo_9mm");
  498. give_item(id, "weapon_hegrenade");
  499. give_item(id, "weapon_flashbang");
  500. give_item(id, "weapon_flashbang");
  501. cs_set_user_bpammo(id, CSW_HEGRENADE, 1)
  502. }
  503. }
  504. menu_destroy(menu);
  505. return PLUGIN_HANDLED;
  506. }
  507. stock ham_give_weapon(id,weapon[])
  508. {
  509. if(!equal(weapon,"weapon_",7)) return 0;
  510.  
  511. new wEnt = engfunc(EngFunc_CreateNamedEntity,engfunc(EngFunc_AllocString,weapon));
  512. if(!pev_valid(wEnt)) return 0;
  513.  
  514. set_pev(wEnt,pev_spawnflags,SF_NORESPAWN);
  515. dllfunc(DLLFunc_Spawn,wEnt);
  516.  
  517. if(!ExecuteHamB(Ham_AddPlayerItem,id,wEnt))
  518. {
  519. if(pev_valid(wEnt)) set_pev(wEnt,pev_flags,pev(wEnt,pev_flags) | FL_KILLME);
  520. return 0;
  521. }
  522. ExecuteHamB(Ham_Item_AttachToPlayer,wEnt,id)
  523. return 1;
  524. }
  525. stock ham_strip_weapon(id,weapon[])
  526. {
  527. if(!equal(weapon,"weapon_",7)) return 0;
  528.  
  529. new wId = get_weaponid(weapon);
  530. if(!wId) return 0;
  531.  
  532. new wEnt;
  533. while((wEnt = engfunc(EngFunc_FindEntityByString,wEnt,"classname",weapon)) && pev(wEnt,pev_owner) != id) {}
  534. if(!wEnt) return 0;
  535.  
  536. if(get_user_weapon(id) == wId) ExecuteHamB(Ham_Weapon_RetireWeapon,wEnt);
  537.  
  538. if(!ExecuteHamB(Ham_RemovePlayerItem,id,wEnt)) return 0;
  539. ExecuteHamB(Ham_Item_Kill,wEnt);
  540.  
  541. set_pev(id,pev_weapons,pev(id,pev_weapons) & ~(1<<wId));
  542. return 1;
  543. }
  544.  
  545. stock print_color(const id, const input[], any:...)
  546. {
  547. new count = 1, players[32]
  548. static msg[191]
  549. vformat(msg, 190, input, 3)
  550.  
  551. replace_all(msg, 190, "!g", "^4")
  552. replace_all(msg, 190, "!y", "^1")
  553. replace_all(msg, 190, "!t", "^3")
  554. replace_all(msg, 190, "á", "á")
  555. replace_all(msg, 190, "é", "Ă©")
  556. replace_all(msg, 190, "í", "Ă­")
  557. replace_all(msg, 190, "ó", "Ăł")
  558. replace_all(msg, 190, "ö", "ö")
  559. replace_all(msg, 190, "ő", "Ĺ‘")
  560. replace_all(msg, 190, "ú", "Ăş")
  561. replace_all(msg, 190, "ü", "ĂĽ")
  562. replace_all(msg, 190, "ű", "ű")
  563. replace_all(msg, 190, "Á", "Á")
  564. replace_all(msg, 190, "É", "É")
  565. replace_all(msg, 190, "Í", "ĂŤ")
  566. replace_all(msg, 190, "Ó", "Ă“")
  567. replace_all(msg, 190, "Ö", "Ă–")
  568. replace_all(msg, 190, "Ő", "Ő")
  569. replace_all(msg, 190, "Ú", "Ăš")
  570. replace_all(msg, 190, "Ü", "Ăś")
  571. replace_all(msg, 190, "Ű", "Ĺ°")
  572.  
  573. if (id) players[0] = id; else get_players(players, count, "ch")
  574. {
  575. for (new i = 0; i < count; i++)
  576. {
  577. if (is_user_connected(players[i]))
  578. {
  579. message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
  580. write_byte(players[i])
  581. write_string(msg)
  582. message_end()
  583. }
  584. }
  585. }
  586. return PLUGIN_HANDLED
  587. }
  588. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  589. *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1038\\ f0\\ fs16 \n\\ par }
  590. */
  591.  
  592.  
  593.  

_________________
Kép

[steam]alfaaaa[/steam]

Ők köszönték meg alfanero nek ezt a hozzászólást: gyurc1111 (2014.01.29. 21:12)
  Népszerűség: 2.27%


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: 1 fegyver
HozzászólásElküldve: 2014.01.29. 14:00 
Offline
Tud valamit
Avatar

Csatlakozott: 2013.08.22. 10:48
Hozzászólások: 119
Megköszönt másnak: 33 alkalommal
Megköszönték neki: 3 alkalommal
alfanero írta:
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <fun>
  3. #include <hamsandwich>
  4. #include <cstrike>
  5. #include <fakemeta>
  6.  
  7. const NETOLTS = ((1<<CSW_HEGRENADE)|(1<<CSW_SMOKEGRENADE)|(1<<CSW_FLASHBANG)|(1<<CSW_KNIFE)|(1<<CSW_C4))
  8.  
  9. new gWPCT;
  10. new gWPTE;
  11. new players[32]
  12. new numct
  13. new numt
  14. new const g_MaxAmmo[] =
  15. {
  16. 0,
  17. 52, //CSW_P228
  18. 0,
  19. 90, //CSW_SCOUT
  20. 0, //CSW_HEGRENADE
  21. 32, //CSW_XM1014
  22. 0, //CSW_C4
  23. 100,//CSW_MAC10
  24. 90, //CSW_AUG
  25. 0, //CSW_SMOKEGRENADE
  26. 120,//CSW_ELITE
  27. 100,//CSW_FIVESEVEN
  28. 100,//CSW_UMP45
  29. 90, //CSW_SG550
  30. 90, //CSW_GALIL
  31. 90, //CSW_FAMAS
  32. 100,//CSW_USP
  33. 120,//CSW_GLOCK18
  34. 30, //CSW_AWP
  35. 120,//CSW_MP5NAVY
  36. 200,//CSW_M249
  37. 32, //CSW_M3
  38. 90, //CSW_M4A1
  39. 120,//CSW_TMP
  40. 90, //CSW_G3SG1
  41. 0, //CSW_FLASHBANG
  42. 35, //CSW_DEAGLE
  43. 90, //CSW_SG552
  44. 90, //CSW_AK47
  45. 0, //CSW_KNIFE
  46. 100//CSW_P90
  47. }
  48. new orokloszer
  49.  
  50. public plugin_init()
  51. {
  52. register_plugin("FegyverMenu", "1.0", "RsN");
  53. RegisterHam(Ham_Spawn, "player", "FegyverMenu",1)
  54. register_event("CurWeapon" , "Event_CurWeapon" , "be" , "1=1" );
  55. orokloszer = register_cvar("fm_orokloszer","1")
  56. }
  57. public Event_CurWeapon(id)
  58. {
  59. if(get_pcvar_num(orokloszer) == 1)
  60. {
  61. if(is_user_alive(id))
  62. {
  63. new fegyver = read_data(2)
  64. if( !( NETOLTS & (1<<fegyver) ) )
  65. {
  66. cs_set_user_bpammo(id, fegyver, g_MaxAmmo[fegyver]);
  67. }
  68. }
  69. }
  70. }
  71. public FegyverMenu(id)
  72. {
  73. new CsTeams:userTeam = cs_get_user_team(id)
  74. if(user_has_weapon(id, CSW_C4))
  75. {
  76. strip_user_weapons(id)
  77. ham_strip_weapon(id,"weapon_glock18")
  78. give_item(id, "weapon_knife")
  79. give_item(id, "weapon_c4")
  80. cs_set_user_plant(id,1,1)
  81. new menu = menu_create("\yFegyverMenĂĽ", "FegyverMenu_mh");
  82. menu_additem(menu, "\yM4a1", "0", 0); // case 0
  83. menu_additem(menu, "\yAk47", "1", 0); // case 1
  84. menu_additem(menu, "\yAWP", "2", 0); // case 2
  85. menu_additem(menu, "\yFamas", "3", 0); // case 3
  86. menu_additem(menu, "\yM249", "4", 0); // case 4
  87. menu_additem(menu, "\yShotgun M3", "5", 0); // case 5
  88. menu_additem(menu, "\yShotgun Xm1014", "6", 0); // case 6
  89. menu_additem(menu, "\yScout", "7", 0); // case 7
  90. menu_additem(menu, "\yMp5navy", "8", 0); // case 8
  91. menu_additem(menu, "\yGalil", "9", 0); // case 9
  92. menu_additem(menu, "\yAug", "10", 0); // case 10
  93. menu_additem(menu, "\ySG552", "11", 0); // case 11
  94. menu_additem(menu, "\yP90", "12", 0); // case 12
  95. menu_additem(menu, "\yTMP", "13", 0); // case 13
  96. menu_additem(menu, "\yUMP45", "14", 0); // case 14
  97. menu_additem(menu, "\yMac10", "15", 0); // case 15
  98. menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
  99. menu_setprop(menu, MPROP_BACKNAME, "Vissza");
  100. menu_setprop(menu, MPROP_NEXTNAME, "Előre");
  101. menu_setprop(menu, MPROP_EXITNAME, "Kilép");
  102. menu_display(id, menu, 0);
  103. }
  104. else if (userTeam == CS_TEAM_CT)
  105. {
  106. strip_user_weapons(id)
  107. give_item(id, "weapon_knife")
  108. ham_strip_weapon(id,"weapon_glock18")
  109. new menu = menu_create("\yFegyverMenĂĽ", "FegyverMenu_mh");
  110. menu_additem(menu, "\yM4a1", "0", 0); // case 0
  111. menu_additem(menu, "\yAk47", "1", 0); // case 1
  112. menu_additem(menu, "\yAWP", "2", 0); // case 2
  113. menu_additem(menu, "\yFamas", "3", 0); // case 3
  114. menu_additem(menu, "\yM249", "4", 0); // case 4
  115. menu_additem(menu, "\yShotgun M3", "5", 0); // case 5
  116. menu_additem(menu, "\yShotgun Xm1014", "6", 0); // case 6
  117. menu_additem(menu, "\yScout", "7", 0); // case 7
  118. menu_additem(menu, "\yMp5navy", "8", 0); // case 8
  119. menu_additem(menu, "\yGalil", "9", 0); // case 9
  120. menu_additem(menu, "\yAug", "10", 0); // case 10
  121. menu_additem(menu, "\ySG552", "11", 0); // case 11
  122. menu_additem(menu, "\yP90", "12", 0); // case 12
  123. menu_additem(menu, "\yTMP", "13", 0); // case 13
  124. menu_additem(menu, "\yUMP45", "14", 0); // case 14
  125. menu_additem(menu, "\yMac10", "15", 0); // case 15
  126. menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
  127. menu_setprop(menu, MPROP_BACKNAME, "Vissza");
  128. menu_setprop(menu, MPROP_NEXTNAME, "Előre");
  129. menu_setprop(menu, MPROP_EXITNAME, "Kilép");
  130. menu_display(id, menu, 0);
  131. }
  132. else if (userTeam == CS_TEAM_T)
  133. {
  134. strip_user_weapons(id)
  135. ham_strip_weapon(id,"weapon_usp")
  136. give_item(id, "weapon_knife")
  137. give_item(id, "item_thighpack");
  138. new menu = menu_create("\yFegyverMenĂĽ", "FegyverMenu_mh");
  139. menu_additem(menu, "\yM4a1", "0", 0); // case 0
  140. menu_additem(menu, "\yAk47", "1", 0); // case 1
  141. menu_additem(menu, "\yAWP", "2", 0); // case 2
  142. menu_additem(menu, "\yFamas", "3", 0); // case 3
  143. menu_additem(menu, "\yM249", "4", 0); // case 4
  144. menu_additem(menu, "\yShotgun M3", "5", 0); // case 5
  145. menu_additem(menu, "\yShotgun Xm1014", "6", 0); // case 6
  146. menu_additem(menu, "\yScout", "7", 0); // case 7
  147. menu_additem(menu, "\yMp5navy", "8", 0); // case 8
  148. menu_additem(menu, "\yGalil", "9", 0); // case 9
  149. menu_additem(menu, "\yAug", "10", 0); // case 10
  150. menu_additem(menu, "\ySG552", "11", 0); // case 11
  151. menu_additem(menu, "\yP90", "12", 0); // case 12
  152. menu_additem(menu, "\yTMP", "13", 0); // case 13
  153. menu_additem(menu, "\yUMP45", "14", 0); // case 14
  154. menu_additem(menu, "\yMac10", "15", 0); // case 15
  155. menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
  156. menu_setprop(menu, MPROP_BACKNAME, "Vissza");
  157. menu_setprop(menu, MPROP_NEXTNAME, "Előre");
  158. menu_setprop(menu, MPROP_EXITNAME, "Kilép");
  159. menu_display(id, menu, 0);
  160. }
  161. }
  162. public FegyverMenu_mh(id, menu, item)
  163. {
  164. new command[6], name[64], access, callback;
  165. menu_item_getinfo(menu, item, access, command, sizeof command - 1, name, sizeof name - 1, callback);
  166. switch(item)
  167. {
  168. case 0:
  169. {
  170. give_item(id, "weapon_m4a1");
  171. give_item(id, "ammo_556nato");
  172. give_item(id, "ammo_556nato");
  173. give_item(id, "ammo_556nato");
  174. give_item(id, "weapon_knife");
  175. give_item(id, "item_assaultsuit")
  176. PistolMenu(id);
  177. }
  178. case 1:
  179. {
  180. give_item(id, "weapon_ak47");
  181. give_item(id, "ammo_762nato");
  182. give_item(id, "ammo_762nato");
  183. give_item(id, "ammo_762nato");
  184. give_item(id, "weapon_knife");
  185. give_item(id, "item_assaultsuit")
  186. PistolMenu(id);
  187. }
  188. case 2:
  189. {
  190. new CsTeams:userTeam = cs_get_user_team(id);
  191. if(numct >= 4 && numt >= 4)
  192. {
  193.  
  194. if(userTeam == CS_TEAM_CT)
  195. {
  196. if(gWPCT < 2)
  197. {
  198. give_item(id, "weapon_awp");
  199. give_item(id, "ammo_338magnum");
  200. give_item(id, "ammo_338magnum");
  201. give_item(id, "ammo_338magnum");
  202. give_item(id, "weapon_knife");
  203. give_item(id, "item_assaultsuit")
  204. PistolMenu(id);
  205.  
  206. {
  207. client_print(id, print_center, "Csak 2 ember wpzhet csapatonként!");
  208. fegyvermenu(id);
  209. }
  210. }
  211. }
  212. else
  213. {
  214. client_print(id, print_center, "Nincs meg a 4v4 így nem használhatod az AWP-t!")
  215. fegyvermenu(id)
  216. }
  217. }
  218. if(userTeam == CS_TEAM_T)
  219. {
  220. if(gWPTE < 2)
  221. {
  222. give_player_grenades(id);
  223. give_item(id, "weapon_knife");
  224. give_item(id, "weapon_awp");
  225. give_item(id, "weapon_deagle");
  226. give_item(id, "ammo_50ae");
  227. give_item(id, "ammo_50ae");
  228. give_item(id, "ammo_50ae");
  229. give_item(id, "ammo_338magnum");
  230. give_item(id, "ammo_338magnum");
  231. give_item(id, "ammo_338magnum");
  232. gWPTE++
  233. }
  234. else
  235. {
  236. client_print(id, print_center, "Csak 2 ember wpzhet csapatonként!");
  237. fegyvermenu(id);
  238. }
  239. }
  240. }
  241. else
  242. {
  243. client_print(id, print_center, "Nincs meg a 4v4 így nem használhatod az AWP-t!")
  244. fegyvermenu(id)
  245. }
  246.  
  247.  
  248. }
  249. case 3:
  250. {
  251. give_item(id, "weapon_famas");
  252. give_item(id, "ammo_556nato");
  253. give_item(id, "ammo_556nato");
  254. give_item(id, "ammo_556nato");
  255. give_item(id, "ammo_556nato");
  256. give_item(id, "weapon_knife");
  257. give_item(id, "item_assaultsuit")
  258. PistolMenu(id);
  259. }
  260. case 4:
  261. {
  262. give_item(id, "weapon_m249");
  263. give_item(id, "ammo_556nato");
  264. give_item(id, "ammo_556nato");
  265. give_item(id, "weapon_knife");
  266. give_item(id, "item_assaultsuit")
  267. PistolMenu(id);
  268. }
  269. case 5:
  270. {
  271. give_item(id, "weapon_m3");
  272. give_item(id, "ammo_buckshot");
  273. give_item(id, "ammo_buckshot");
  274. give_item(id, "ammo_buckshot");
  275. give_item(id, "weapon_knife");
  276. give_item(id, "item_assaultsuit")
  277. PistolMenu(id);
  278. }
  279. case 6:
  280. {
  281. give_item(id, "weapon_xm1014");
  282. give_item(id, "ammo_buckshot");
  283. give_item(id, "ammo_buckshot");
  284. give_item(id, "ammo_buckshot");
  285. give_item(id, "ammo_buckshot");
  286. give_item(id, "weapon_knife");
  287. give_item(id, "item_assaultsuit")
  288. PistolMenu(id);
  289. }
  290. case 7:
  291. {
  292. give_item(id, "weapon_scout");
  293. give_item(id, "ammo_762nato");
  294. give_item(id, "ammo_762nato");
  295. give_item(id, "ammo_762nato");
  296. give_item(id, "ammo_762nato");
  297. give_item(id, "ammo_762nato");
  298. give_item(id, "ammo_762nato");
  299. give_item(id, "ammo_762nato");
  300. give_item(id, "ammo_762nato");
  301. give_item(id, "ammo_762nato");
  302. give_item(id, "item_assaultsuit")
  303. PistolMenu(id);
  304. }
  305. case 8:
  306. {
  307. give_item(id, "weapon_mp5navy");
  308. give_item(id, "ammo_9mm");
  309. give_item(id, "ammo_9mm");
  310. give_item(id, "ammo_9mm");
  311. give_item(id, "ammo_9mm");
  312. give_item(id, "item_assaultsuit")
  313. PistolMenu(id);
  314. }
  315. case 9:
  316. {
  317. give_item(id, "weapon_galil");
  318. give_item(id, "ammo_556nato");
  319. give_item(id, "ammo_556nato");
  320. give_item(id, "ammo_556nato");
  321. give_item(id, "item_assaultsuit")
  322. PistolMenu(id);
  323. }
  324. case 10:
  325. {
  326. give_item(id, "weapon_aug");
  327. give_item(id, "ammo_556nato");
  328. give_item(id, "ammo_556nato");
  329. give_item(id, "ammo_556nato");
  330. give_item(id, "item_assaultsuit")
  331. PistolMenu(id);
  332. }
  333. case 11:
  334. {
  335. give_item(id, "weapon_sg552");
  336. give_item(id, "ammo_556nato");
  337. give_item(id, "ammo_556nato");
  338. give_item(id, "ammo_556nato");
  339. give_item(id, "item_assaultsuit")
  340. PistolMenu(id);
  341. }
  342. case 12:
  343. {
  344. give_item(id, "weapon_p90");
  345. give_item(id, "ammo_57mm");
  346. give_item(id, "ammo_57mm");
  347. give_item(id, "item_assaultsuit")
  348. PistolMenu(id);
  349. }
  350. case 13:
  351. {
  352. give_item(id, "weapon_tmp");
  353. give_item(id, "ammo_9mm");
  354. give_item(id, "ammo_9mm");
  355. give_item(id, "ammo_9mm");
  356. give_item(id, "ammo_9mm");
  357. give_item(id, "item_assaultsuit")
  358. PistolMenu(id);
  359. }
  360. case 14:
  361. {
  362. give_item(id, "weapon_ump45");
  363. give_item(id, "ammo_45acp");
  364. give_item(id, "ammo_45acp");
  365. give_item(id, "ammo_45acp");
  366. give_item(id, "ammo_45acp");
  367. give_item(id, "weapon_knife");
  368. give_item(id, "item_assaultsuit")
  369. PistolMenu(id);
  370. }
  371. case 15:
  372. {
  373. give_item(id, "weapon_mac10");
  374. give_item(id, "ammo_45acp");
  375. give_item(id, "ammo_45acp");
  376. give_item(id, "ammo_45acp");
  377. give_item(id, "ammo_45acp");
  378. give_item(id, "item_assaultsuit")
  379. PistolMenu(id);
  380. }
  381. }
  382.  
  383. menu_destroy(menu);
  384.  
  385. return PLUGIN_HANDLED;
  386. }
  387. public PistolMenu(id)
  388. {
  389. new menu = menu_create("\yPisztolyMenĂĽ", "PistolMenu_mh");
  390.  
  391. menu_additem(menu, "\yDeagle", "", 0); // case 0
  392. menu_additem(menu, "\yUsp", "", 0); // case 1
  393. menu_additem(menu, "\yGlock18", "", 0); // case 2
  394. menu_additem(menu, "\yP228", "", 0); // case 3
  395. menu_additem(menu, "\yFiveseven", "", 0); // case 4
  396. menu_additem(menu, "\yElite", "", 0); // case 5
  397.  
  398. menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
  399. menu_setprop(menu, MPROP_BACKNAME, "Vissza");
  400. menu_setprop(menu, MPROP_NEXTNAME, "Előre");
  401. menu_setprop(menu, MPROP_EXITNAME, "Kilép");
  402.  
  403. menu_display(id, menu, 0);
  404.  
  405. return PLUGIN_HANDLED;
  406. }
  407.  
  408. public PistolMenu_mh(id, menu, item)
  409. {
  410. if(item == MENU_EXIT)
  411. {
  412. menu_cancel(id);
  413. return PLUGIN_HANDLED;
  414. }
  415.  
  416. new command[6], name[64], access, callback;
  417.  
  418. menu_item_getinfo(menu, item, access, command, sizeof command - 1, name, sizeof name - 1, callback);
  419.  
  420. switch(item)
  421. {
  422. case 0:
  423. {
  424. give_item(id, "weapon_deagle");
  425. give_item(id,"ammo_50ae");
  426. give_item(id,"ammo_50ae");
  427. give_item(id,"ammo_50ae");
  428. give_item(id,"ammo_50ae");
  429. give_item(id,"ammo_50ae");
  430. give_item(id, "weapon_hegrenade");
  431. give_item(id, "weapon_flashbang");
  432. give_item(id, "weapon_flashbang");
  433. cs_set_user_bpammo(id, CSW_HEGRENADE, 1)
  434. }
  435. case 1:
  436. {
  437. give_item(id, "weapon_usp");
  438. give_item(id,"ammo_45acp");
  439. give_item(id,"ammo_45acp");
  440. give_item(id,"ammo_45acp");
  441. give_item(id,"ammo_45acp");
  442. give_item(id,"ammo_45acp");
  443. give_item(id,"ammo_45acp");
  444. give_item(id,"ammo_45acp");
  445. give_item(id,"ammo_45acp");
  446. give_item(id,"ammo_45acp");
  447. give_item(id, "weapon_hegrenade");
  448. give_item(id, "weapon_flashbang");
  449. give_item(id, "weapon_flashbang");
  450. cs_set_user_bpammo(id, CSW_HEGRENADE, 1)
  451. }
  452. case 2:
  453. {
  454. give_item(id, "weapon_glock18");
  455. give_item(id,"ammo_9mm");
  456. give_item(id,"ammo_9mm");
  457. give_item(id,"ammo_9mm");
  458. give_item(id,"ammo_9mm");
  459. give_item(id,"ammo_9mm");
  460. give_item(id,"ammo_9mm");
  461. give_item(id, "weapon_hegrenade");
  462. give_item(id, "weapon_flashbang");
  463. give_item(id, "weapon_flashbang");
  464. cs_set_user_bpammo(id, CSW_HEGRENADE, 1)
  465. }
  466. case 3:
  467. {
  468. give_item(id, "weapon_p228");
  469. give_item(id,"ammo_357sig");
  470. give_item(id,"ammo_357sig");
  471. give_item(id,"ammo_357sig");
  472. give_item(id,"ammo_357sig");
  473. give_item(id, "weapon_hegrenade");
  474. give_item(id, "weapon_flashbang");
  475. give_item(id, "weapon_flashbang");
  476. cs_set_user_bpammo(id, CSW_HEGRENADE, 1)
  477. }
  478. case 4:
  479. {
  480. give_item(id, "weapon_fiveseven");
  481. give_item(id,"ammo_57mm");
  482. give_item(id,"ammo_57mm");
  483. give_item(id,"ammo_57mm");
  484. give_item(id,"ammo_57mm");
  485. give_item(id,"ammo_57mm");
  486. give_item(id, "weapon_hegrenade");
  487. give_item(id, "weapon_flashbang");
  488. give_item(id, "weapon_flashbang");
  489. cs_set_user_bpammo(id, CSW_HEGRENADE, 1)
  490. }
  491. case 5:
  492. {
  493. give_item(id, "weapon_elite");
  494. give_item(id,"ammo_9mm");
  495. give_item(id,"ammo_9mm");
  496. give_item(id,"ammo_9mm");
  497. give_item(id,"ammo_9mm");
  498. give_item(id, "weapon_hegrenade");
  499. give_item(id, "weapon_flashbang");
  500. give_item(id, "weapon_flashbang");
  501. cs_set_user_bpammo(id, CSW_HEGRENADE, 1)
  502. }
  503. }
  504. menu_destroy(menu);
  505. return PLUGIN_HANDLED;
  506. }
  507. stock ham_give_weapon(id,weapon[])
  508. {
  509. if(!equal(weapon,"weapon_",7)) return 0;
  510.  
  511. new wEnt = engfunc(EngFunc_CreateNamedEntity,engfunc(EngFunc_AllocString,weapon));
  512. if(!pev_valid(wEnt)) return 0;
  513.  
  514. set_pev(wEnt,pev_spawnflags,SF_NORESPAWN);
  515. dllfunc(DLLFunc_Spawn,wEnt);
  516.  
  517. if(!ExecuteHamB(Ham_AddPlayerItem,id,wEnt))
  518. {
  519. if(pev_valid(wEnt)) set_pev(wEnt,pev_flags,pev(wEnt,pev_flags) | FL_KILLME);
  520. return 0;
  521. }
  522. ExecuteHamB(Ham_Item_AttachToPlayer,wEnt,id)
  523. return 1;
  524. }
  525. stock ham_strip_weapon(id,weapon[])
  526. {
  527. if(!equal(weapon,"weapon_",7)) return 0;
  528.  
  529. new wId = get_weaponid(weapon);
  530. if(!wId) return 0;
  531.  
  532. new wEnt;
  533. while((wEnt = engfunc(EngFunc_FindEntityByString,wEnt,"classname",weapon)) && pev(wEnt,pev_owner) != id) {}
  534. if(!wEnt) return 0;
  535.  
  536. if(get_user_weapon(id) == wId) ExecuteHamB(Ham_Weapon_RetireWeapon,wEnt);
  537.  
  538. if(!ExecuteHamB(Ham_RemovePlayerItem,id,wEnt)) return 0;
  539. ExecuteHamB(Ham_Item_Kill,wEnt);
  540.  
  541. set_pev(id,pev_weapons,pev(id,pev_weapons) & ~(1<<wId));
  542. return 1;
  543. }
  544.  
  545. stock print_color(const id, const input[], any:...)
  546. {
  547. new count = 1, players[32]
  548. static msg[191]
  549. vformat(msg, 190, input, 3)
  550.  
  551. replace_all(msg, 190, "!g", "^4")
  552. replace_all(msg, 190, "!y", "^1")
  553. replace_all(msg, 190, "!t", "^3")
  554. replace_all(msg, 190, "á", "á")
  555. replace_all(msg, 190, "é", "Ă©")
  556. replace_all(msg, 190, "í", "Ă­")
  557. replace_all(msg, 190, "ó", "Ăł")
  558. replace_all(msg, 190, "ö", "ö")
  559. replace_all(msg, 190, "ő", "Ĺ‘")
  560. replace_all(msg, 190, "ú", "Ăş")
  561. replace_all(msg, 190, "ü", "ĂĽ")
  562. replace_all(msg, 190, "ű", "ű")
  563. replace_all(msg, 190, "Á", "Á")
  564. replace_all(msg, 190, "É", "É")
  565. replace_all(msg, 190, "Í", "ĂŤ")
  566. replace_all(msg, 190, "Ó", "Ă“")
  567. replace_all(msg, 190, "Ö", "Ă–")
  568. replace_all(msg, 190, "Ő", "Ő")
  569. replace_all(msg, 190, "Ú", "Ăš")
  570. replace_all(msg, 190, "Ü", "Ăś")
  571. replace_all(msg, 190, "Ű", "Ĺ°")
  572.  
  573. if (id) players[0] = id; else get_players(players, count, "ch")
  574. {
  575. for (new i = 0; i < count; i++)
  576. {
  577. if (is_user_connected(players[i]))
  578. {
  579. message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
  580. write_byte(players[i])
  581. write_string(msg)
  582. message_end()
  583. }
  584. }
  585. }
  586. return PLUGIN_HANDLED
  587. }
  588. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  589. *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1038\\ f0\\ fs16 \n\\ par }
  590. */
  591.  
  592.  
  593.  

Hát, nem is azért, de amit te küldtél az nekem ezt adta vissza(Az alap):
Kód:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

399c7584cab8e4429787fd048de5e108.sma(191) : warning 217: loose indentation
399c7584cab8e4429787fd048de5e108.sma(206) : warning 217: loose indentation
399c7584cab8e4429787fd048de5e108.sma(208) : error 017: undefined symbol "fegyvermenu"
399c7584cab8e4429787fd048de5e108.sma(212) : warning 217: loose indentation
399c7584cab8e4429787fd048de5e108.sma(215) : error 017: undefined symbol "fegyvermenu"
399c7584cab8e4429787fd048de5e108.sma(218) : warning 217: loose indentation
399c7584cab8e4429787fd048de5e108.sma(222) : error 017: undefined symbol "give_player_grenades"
399c7584cab8e4429787fd048de5e108.sma(237) : error 017: undefined symbol "fegyvermenu"
399c7584cab8e4429787fd048de5e108.sma(241) : error 002: only a single statement (or expression) can follow each "case"
399c7584cab8e4429787fd048de5e108.sma(244) : error 017: undefined symbol "fegyvermenu"
399c7584cab8e4429787fd048de5e108.sma(249) : error 010: invalid function or declaration
399c7584cab8e4429787fd048de5e108.sma(258) : warning 218: old style prototypes used with optional semicolumns
399c7584cab8e4429787fd048de5e108.sma(259) : error 054: unmatched closing brace
399c7584cab8e4429787fd048de5e108.sma(260) : error 010: invalid function or declaration
399c7584cab8e4429787fd048de5e108.sma(267) : warning 218: old style prototypes used with optional semicolumns
399c7584cab8e4429787fd048de5e108.sma(268) : error 054: unmatched closing brace
399c7584cab8e4429787fd048de5e108.sma(269) : error 010: invalid function or declaration
399c7584cab8e4429787fd048de5e108.sma(277) : warning 218: old style prototypes used with optional semicolumns
399c7584cab8e4429787fd048de5e108.sma(278) : error 054: unmatched closing brace
399c7584cab8e4429787fd048de5e108.sma(279) : error 010: invalid function or declaration
399c7584cab8e4429787fd048de5e108.sma(288) : warning 218: old style prototypes used with optional semicolumns
399c7584cab8e4429787fd048de5e108.sma(289) : error 054: unmatched closing brace
399c7584cab8e4429787fd048de5e108.sma(290) : error 010: invalid function or declaration
399c7584cab8e4429787fd048de5e108.sma(303) : warning 218: old style prototypes used with optional semicolumns
399c7584cab8e4429787fd048de5e108.sma(304) : error 054: unmatched closing brace
399c7584cab8e4429787fd048de5e108.sma(305) : error 010: invalid function or declaration
399c7584cab8e4429787fd048de5e108.sma(313) : warning 218: old style prototypes used with optional semicolumns
399c7584cab8e4429787fd048de5e108.sma(314) : error 054: unmatched closing brace
399c7584cab8e4429787fd048de5e108.sma(315) : error 010: invalid function or declaration
399c7584cab8e4429787fd048de5e108.sma(322) : warning 218: old style prototypes used with optional semicolumns
399c7584cab8e4429787fd048de5e108.sma(323) : error 054: unmatched closing brace
399c7584cab8e4429787fd048de5e108.sma(324) : error 010: invalid function or declaration
399c7584cab8e4429787fd048de5e108.sma(331) : warning 218: old style prototypes used with optional semicolumns
399c7584cab8e4429787fd048de5e108.sma(332) : error 054: unmatched closing brace
399c7584cab8e4429787fd048de5e108.sma(333) : error 010: invalid function or declaration
399c7584cab8e4429787fd048de5e108.sma(340) : warning 218: old style prototypes used with optional semicolumns
399c7584cab8e4429787fd048de5e108.sma(341) : error 054: unmatched closing brace
399c7584cab8e4429787fd048de5e108.sma(342) : error 010: invalid function or declaration
399c7584cab8e4429787fd048de5e108.sma(348) : warning 218: old style prototypes used with optional semicolumns
399c7584cab8e4429787fd048de5e108.sma(349) : error 054: unmatched closing brace

Compilation aborted.
26 Errors.
Could not locate output file 399c7584cab8e4429787fd048de5e108.amx (compile failed).

_________________
STEAM:
[steam]thebvn[/steam]
FaceBook oldal
Dream Deathrun: CSATLAKOZÁS!


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: 1 fegyver
HozzászólásElküldve: 2014.01.29. 15:11 
Offline
Tud valamit

Csatlakozott: 2012.04.16. 22:32
Hozzászólások: 104
Megköszönt másnak: 14 alkalommal
Megköszönték neki: 10 alkalommal
Óóóó alig pár sor az egész:D
Idézet:
xXLegendXx írta:
alfanero írta:
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <fun>
  3. #include <hamsandwich>
  4. #include <cstrike>
  5. #include <fakemeta>
  6.  
  7. const NETOLTS = ((1<<CSW_HEGRENADE)|(1<<CSW_SMOKEGRENADE)|(1<<CSW_FLASHBANG)|(1<<CSW_KNIFE)|(1<<CSW_C4))
  8.  
  9. new gWPCT;
  10. new gWPTE;
  11. new players[32]
  12. new numct
  13. new numt
  14. new const g_MaxAmmo[] =
  15. {
  16. 0,
  17. 52, //CSW_P228
  18. 0,
  19. 90, //CSW_SCOUT
  20. 0, //CSW_HEGRENADE
  21. 32, //CSW_XM1014
  22. 0, //CSW_C4
  23. 100,//CSW_MAC10
  24. 90, //CSW_AUG
  25. 0, //CSW_SMOKEGRENADE
  26. 120,//CSW_ELITE
  27. 100,//CSW_FIVESEVEN
  28. 100,//CSW_UMP45
  29. 90, //CSW_SG550
  30. 90, //CSW_GALIL
  31. 90, //CSW_FAMAS
  32. 100,//CSW_USP
  33. 120,//CSW_GLOCK18
  34. 30, //CSW_AWP
  35. 120,//CSW_MP5NAVY
  36. 200,//CSW_M249
  37. 32, //CSW_M3
  38. 90, //CSW_M4A1
  39. 120,//CSW_TMP
  40. 90, //CSW_G3SG1
  41. 0, //CSW_FLASHBANG
  42. 35, //CSW_DEAGLE
  43. 90, //CSW_SG552
  44. 90, //CSW_AK47
  45. 0, //CSW_KNIFE
  46. 100//CSW_P90
  47. }
  48. new orokloszer
  49.  
  50. public plugin_init()
  51. {
  52. register_plugin("FegyverMenu", "1.0", "RsN");
  53. RegisterHam(Ham_Spawn, "player", "FegyverMenu",1)
  54. register_event("CurWeapon" , "Event_CurWeapon" , "be" , "1=1" );
  55. orokloszer = register_cvar("fm_orokloszer","1")
  56. }
  57. public Event_CurWeapon(id)
  58. {
  59. if(get_pcvar_num(orokloszer) == 1)
  60. {
  61. if(is_user_alive(id))
  62. {
  63. new fegyver = read_data(2)
  64. if( !( NETOLTS & (1<<fegyver) ) )
  65. {
  66. cs_set_user_bpammo(id, fegyver, g_MaxAmmo[fegyver]);
  67. }
  68. }
  69. }
  70. }
  71. public FegyverMenu(id)
  72. {
  73. new CsTeams:userTeam = cs_get_user_team(id)
  74. if(user_has_weapon(id, CSW_C4))
  75. {
  76. strip_user_weapons(id)
  77. ham_strip_weapon(id,"weapon_glock18")
  78. give_item(id, "weapon_knife")
  79. give_item(id, "weapon_c4")
  80. cs_set_user_plant(id,1,1)
  81. new menu = menu_create("\yFegyverMenĂĽ", "FegyverMenu_mh");
  82. menu_additem(menu, "\yM4a1", "0", 0); // case 0
  83. menu_additem(menu, "\yAk47", "1", 0); // case 1
  84. menu_additem(menu, "\yAWP", "2", 0); // case 2
  85. menu_additem(menu, "\yFamas", "3", 0); // case 3
  86. menu_additem(menu, "\yM249", "4", 0); // case 4
  87. menu_additem(menu, "\yShotgun M3", "5", 0); // case 5
  88. menu_additem(menu, "\yShotgun Xm1014", "6", 0); // case 6
  89. menu_additem(menu, "\yScout", "7", 0); // case 7
  90. menu_additem(menu, "\yMp5navy", "8", 0); // case 8
  91. menu_additem(menu, "\yGalil", "9", 0); // case 9
  92. menu_additem(menu, "\yAug", "10", 0); // case 10
  93. menu_additem(menu, "\ySG552", "11", 0); // case 11
  94. menu_additem(menu, "\yP90", "12", 0); // case 12
  95. menu_additem(menu, "\yTMP", "13", 0); // case 13
  96. menu_additem(menu, "\yUMP45", "14", 0); // case 14
  97. menu_additem(menu, "\yMac10", "15", 0); // case 15
  98. menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
  99. menu_setprop(menu, MPROP_BACKNAME, "Vissza");
  100. menu_setprop(menu, MPROP_NEXTNAME, "Előre");
  101. menu_setprop(menu, MPROP_EXITNAME, "Kilép");
  102. menu_display(id, menu, 0);
  103. }
  104. else if (userTeam == CS_TEAM_CT)
  105. {
  106. strip_user_weapons(id)
  107. give_item(id, "weapon_knife")
  108. ham_strip_weapon(id,"weapon_glock18")
  109. new menu = menu_create("\yFegyverMenĂĽ", "FegyverMenu_mh");
  110. menu_additem(menu, "\yM4a1", "0", 0); // case 0
  111. menu_additem(menu, "\yAk47", "1", 0); // case 1
  112. menu_additem(menu, "\yAWP", "2", 0); // case 2
  113. menu_additem(menu, "\yFamas", "3", 0); // case 3
  114. menu_additem(menu, "\yM249", "4", 0); // case 4
  115. menu_additem(menu, "\yShotgun M3", "5", 0); // case 5
  116. menu_additem(menu, "\yShotgun Xm1014", "6", 0); // case 6
  117. menu_additem(menu, "\yScout", "7", 0); // case 7
  118. menu_additem(menu, "\yMp5navy", "8", 0); // case 8
  119. menu_additem(menu, "\yGalil", "9", 0); // case 9
  120. menu_additem(menu, "\yAug", "10", 0); // case 10
  121. menu_additem(menu, "\ySG552", "11", 0); // case 11
  122. menu_additem(menu, "\yP90", "12", 0); // case 12
  123. menu_additem(menu, "\yTMP", "13", 0); // case 13
  124. menu_additem(menu, "\yUMP45", "14", 0); // case 14
  125. menu_additem(menu, "\yMac10", "15", 0); // case 15
  126. menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
  127. menu_setprop(menu, MPROP_BACKNAME, "Vissza");
  128. menu_setprop(menu, MPROP_NEXTNAME, "Előre");
  129. menu_setprop(menu, MPROP_EXITNAME, "Kilép");
  130. menu_display(id, menu, 0);
  131. }
  132. else if (userTeam == CS_TEAM_T)
  133. {
  134. strip_user_weapons(id)
  135. ham_strip_weapon(id,"weapon_usp")
  136. give_item(id, "weapon_knife")
  137. give_item(id, "item_thighpack");
  138. new menu = menu_create("\yFegyverMenĂĽ", "FegyverMenu_mh");
  139. menu_additem(menu, "\yM4a1", "0", 0); // case 0
  140. menu_additem(menu, "\yAk47", "1", 0); // case 1
  141. menu_additem(menu, "\yAWP", "2", 0); // case 2
  142. menu_additem(menu, "\yFamas", "3", 0); // case 3
  143. menu_additem(menu, "\yM249", "4", 0); // case 4
  144. menu_additem(menu, "\yShotgun M3", "5", 0); // case 5
  145. menu_additem(menu, "\yShotgun Xm1014", "6", 0); // case 6
  146. menu_additem(menu, "\yScout", "7", 0); // case 7
  147. menu_additem(menu, "\yMp5navy", "8", 0); // case 8
  148. menu_additem(menu, "\yGalil", "9", 0); // case 9
  149. menu_additem(menu, "\yAug", "10", 0); // case 10
  150. menu_additem(menu, "\ySG552", "11", 0); // case 11
  151. menu_additem(menu, "\yP90", "12", 0); // case 12
  152. menu_additem(menu, "\yTMP", "13", 0); // case 13
  153. menu_additem(menu, "\yUMP45", "14", 0); // case 14
  154. menu_additem(menu, "\yMac10", "15", 0); // case 15
  155. menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
  156. menu_setprop(menu, MPROP_BACKNAME, "Vissza");
  157. menu_setprop(menu, MPROP_NEXTNAME, "Előre");
  158. menu_setprop(menu, MPROP_EXITNAME, "Kilép");
  159. menu_display(id, menu, 0);
  160. }
  161. }
  162. public FegyverMenu_mh(id, menu, item)
  163. {
  164. new command[6], name[64], access, callback;
  165. menu_item_getinfo(menu, item, access, command, sizeof command - 1, name, sizeof name - 1, callback);
  166. switch(item)
  167. {
  168. case 0:
  169. {
  170. give_item(id, "weapon_m4a1");
  171. give_item(id, "ammo_556nato");
  172. give_item(id, "ammo_556nato");
  173. give_item(id, "ammo_556nato");
  174. give_item(id, "weapon_knife");
  175. give_item(id, "item_assaultsuit")
  176. PistolMenu(id);
  177. }
  178. case 1:
  179. {
  180. give_item(id, "weapon_ak47");
  181. give_item(id, "ammo_762nato");
  182. give_item(id, "ammo_762nato");
  183. give_item(id, "ammo_762nato");
  184. give_item(id, "weapon_knife");
  185. give_item(id, "item_assaultsuit")
  186. PistolMenu(id);
  187. }
  188. case 2:
  189. {
  190. new CsTeams:userTeam = cs_get_user_team(id);
  191. if(numct >= 4 && numt >= 4)
  192. {
  193.  
  194. if(userTeam == CS_TEAM_CT)
  195. {
  196. if(gWPCT < 2)
  197. {
  198. give_item(id, "weapon_awp");
  199. give_item(id, "ammo_338magnum");
  200. give_item(id, "ammo_338magnum");
  201. give_item(id, "ammo_338magnum");
  202. give_item(id, "weapon_knife");
  203. give_item(id, "item_assaultsuit")
  204. PistolMenu(id);
  205.  
  206. {
  207. client_print(id, print_center, "Csak 2 ember wpzhet csapatonként!");
  208. fegyvermenu(id);
  209. }
  210. }
  211. }
  212. else
  213. {
  214. client_print(id, print_center, "Nincs meg a 4v4 így nem használhatod az AWP-t!")
  215. fegyvermenu(id)
  216. }
  217. }
  218. if(userTeam == CS_TEAM_T)
  219. {
  220. if(gWPTE < 2)
  221. {
  222. give_player_grenades(id);
  223. give_item(id, "weapon_knife");
  224. give_item(id, "weapon_awp");
  225. give_item(id, "weapon_deagle");
  226. give_item(id, "ammo_50ae");
  227. give_item(id, "ammo_50ae");
  228. give_item(id, "ammo_50ae");
  229. give_item(id, "ammo_338magnum");
  230. give_item(id, "ammo_338magnum");
  231. give_item(id, "ammo_338magnum");
  232. gWPTE++
  233. }
  234. else
  235. {
  236. client_print(id, print_center, "Csak 2 ember wpzhet csapatonként!");
  237. fegyvermenu(id);
  238. }
  239. }
  240. }
  241. else
  242. {
  243. client_print(id, print_center, "Nincs meg a 4v4 így nem használhatod az AWP-t!")
  244. fegyvermenu(id)
  245. }
  246.  
  247.  
  248. }
  249. case 3:
  250. {
  251. give_item(id, "weapon_famas");
  252. give_item(id, "ammo_556nato");
  253. give_item(id, "ammo_556nato");
  254. give_item(id, "ammo_556nato");
  255. give_item(id, "ammo_556nato");
  256. give_item(id, "weapon_knife");
  257. give_item(id, "item_assaultsuit")
  258. PistolMenu(id);
  259. }
  260. case 4:
  261. {
  262. give_item(id, "weapon_m249");
  263. give_item(id, "ammo_556nato");
  264. give_item(id, "ammo_556nato");
  265. give_item(id, "weapon_knife");
  266. give_item(id, "item_assaultsuit")
  267. PistolMenu(id);
  268. }
  269. case 5:
  270. {
  271. give_item(id, "weapon_m3");
  272. give_item(id, "ammo_buckshot");
  273. give_item(id, "ammo_buckshot");
  274. give_item(id, "ammo_buckshot");
  275. give_item(id, "weapon_knife");
  276. give_item(id, "item_assaultsuit")
  277. PistolMenu(id);
  278. }
  279. case 6:
  280. {
  281. give_item(id, "weapon_xm1014");
  282. give_item(id, "ammo_buckshot");
  283. give_item(id, "ammo_buckshot");
  284. give_item(id, "ammo_buckshot");
  285. give_item(id, "ammo_buckshot");
  286. give_item(id, "weapon_knife");
  287. give_item(id, "item_assaultsuit")
  288. PistolMenu(id);
  289. }
  290. case 7:
  291. {
  292. give_item(id, "weapon_scout");
  293. give_item(id, "ammo_762nato");
  294. give_item(id, "ammo_762nato");
  295. give_item(id, "ammo_762nato");
  296. give_item(id, "ammo_762nato");
  297. give_item(id, "ammo_762nato");
  298. give_item(id, "ammo_762nato");
  299. give_item(id, "ammo_762nato");
  300. give_item(id, "ammo_762nato");
  301. give_item(id, "ammo_762nato");
  302. give_item(id, "item_assaultsuit")
  303. PistolMenu(id);
  304. }
  305. case 8:
  306. {
  307. give_item(id, "weapon_mp5navy");
  308. give_item(id, "ammo_9mm");
  309. give_item(id, "ammo_9mm");
  310. give_item(id, "ammo_9mm");
  311. give_item(id, "ammo_9mm");
  312. give_item(id, "item_assaultsuit")
  313. PistolMenu(id);
  314. }
  315. case 9:
  316. {
  317. give_item(id, "weapon_galil");
  318. give_item(id, "ammo_556nato");
  319. give_item(id, "ammo_556nato");
  320. give_item(id, "ammo_556nato");
  321. give_item(id, "item_assaultsuit")
  322. PistolMenu(id);
  323. }
  324. case 10:
  325. {
  326. give_item(id, "weapon_aug");
  327. give_item(id, "ammo_556nato");
  328. give_item(id, "ammo_556nato");
  329. give_item(id, "ammo_556nato");
  330. give_item(id, "item_assaultsuit")
  331. PistolMenu(id);
  332. }
  333. case 11:
  334. {
  335. give_item(id, "weapon_sg552");
  336. give_item(id, "ammo_556nato");
  337. give_item(id, "ammo_556nato");
  338. give_item(id, "ammo_556nato");
  339. give_item(id, "item_assaultsuit")
  340. PistolMenu(id);
  341. }
  342. case 12:
  343. {
  344. give_item(id, "weapon_p90");
  345. give_item(id, "ammo_57mm");
  346. give_item(id, "ammo_57mm");
  347. give_item(id, "item_assaultsuit")
  348. PistolMenu(id);
  349. }
  350. case 13:
  351. {
  352. give_item(id, "weapon_tmp");
  353. give_item(id, "ammo_9mm");
  354. give_item(id, "ammo_9mm");
  355. give_item(id, "ammo_9mm");
  356. give_item(id, "ammo_9mm");
  357. give_item(id, "item_assaultsuit")
  358. PistolMenu(id);
  359. }
  360. case 14:
  361. {
  362. give_item(id, "weapon_ump45");
  363. give_item(id, "ammo_45acp");
  364. give_item(id, "ammo_45acp");
  365. give_item(id, "ammo_45acp");
  366. give_item(id, "ammo_45acp");
  367. give_item(id, "weapon_knife");
  368. give_item(id, "item_assaultsuit")
  369. PistolMenu(id);
  370. }
  371. case 15:
  372. {
  373. give_item(id, "weapon_mac10");
  374. give_item(id, "ammo_45acp");
  375. give_item(id, "ammo_45acp");
  376. give_item(id, "ammo_45acp");
  377. give_item(id, "ammo_45acp");
  378. give_item(id, "item_assaultsuit")
  379. PistolMenu(id);
  380. }
  381. }
  382.  
  383. menu_destroy(menu);
  384.  
  385. return PLUGIN_HANDLED;
  386. }
  387. public PistolMenu(id)
  388. {
  389. new menu = menu_create("\yPisztolyMenĂĽ", "PistolMenu_mh");
  390.  
  391. menu_additem(menu, "\yDeagle", "", 0); // case 0
  392. menu_additem(menu, "\yUsp", "", 0); // case 1
  393. menu_additem(menu, "\yGlock18", "", 0); // case 2
  394. menu_additem(menu, "\yP228", "", 0); // case 3
  395. menu_additem(menu, "\yFiveseven", "", 0); // case 4
  396. menu_additem(menu, "\yElite", "", 0); // case 5
  397.  
  398. menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
  399. menu_setprop(menu, MPROP_BACKNAME, "Vissza");
  400. menu_setprop(menu, MPROP_NEXTNAME, "Előre");
  401. menu_setprop(menu, MPROP_EXITNAME, "Kilép");
  402.  
  403. menu_display(id, menu, 0);
  404.  
  405. return PLUGIN_HANDLED;
  406. }
  407.  
  408. public PistolMenu_mh(id, menu, item)
  409. {
  410. if(item == MENU_EXIT)
  411. {
  412. menu_cancel(id);
  413. return PLUGIN_HANDLED;
  414. }
  415.  
  416. new command[6], name[64], access, callback;
  417.  
  418. menu_item_getinfo(menu, item, access, command, sizeof command - 1, name, sizeof name - 1, callback);
  419.  
  420. switch(item)
  421. {
  422. case 0:
  423. {
  424. give_item(id, "weapon_deagle");
  425. give_item(id,"ammo_50ae");
  426. give_item(id,"ammo_50ae");
  427. give_item(id,"ammo_50ae");
  428. give_item(id,"ammo_50ae");
  429. give_item(id,"ammo_50ae");
  430. give_item(id, "weapon_hegrenade");
  431. give_item(id, "weapon_flashbang");
  432. give_item(id, "weapon_flashbang");
  433. cs_set_user_bpammo(id, CSW_HEGRENADE, 1)
  434. }
  435. case 1:
  436. {
  437. give_item(id, "weapon_usp");
  438. give_item(id,"ammo_45acp");
  439. give_item(id,"ammo_45acp");
  440. give_item(id,"ammo_45acp");
  441. give_item(id,"ammo_45acp");
  442. give_item(id,"ammo_45acp");
  443. give_item(id,"ammo_45acp");
  444. give_item(id,"ammo_45acp");
  445. give_item(id,"ammo_45acp");
  446. give_item(id,"ammo_45acp");
  447. give_item(id, "weapon_hegrenade");
  448. give_item(id, "weapon_flashbang");
  449. give_item(id, "weapon_flashbang");
  450. cs_set_user_bpammo(id, CSW_HEGRENADE, 1)
  451. }
  452. case 2:
  453. {
  454. give_item(id, "weapon_glock18");
  455. give_item(id,"ammo_9mm");
  456. give_item(id,"ammo_9mm");
  457. give_item(id,"ammo_9mm");
  458. give_item(id,"ammo_9mm");
  459. give_item(id,"ammo_9mm");
  460. give_item(id,"ammo_9mm");
  461. give_item(id, "weapon_hegrenade");
  462. give_item(id, "weapon_flashbang");
  463. give_item(id, "weapon_flashbang");
  464. cs_set_user_bpammo(id, CSW_HEGRENADE, 1)
  465. }
  466. case 3:
  467. {
  468. give_item(id, "weapon_p228");
  469. give_item(id,"ammo_357sig");
  470. give_item(id,"ammo_357sig");
  471. give_item(id,"ammo_357sig");
  472. give_item(id,"ammo_357sig");
  473. give_item(id, "weapon_hegrenade");
  474. give_item(id, "weapon_flashbang");
  475. give_item(id, "weapon_flashbang");
  476. cs_set_user_bpammo(id, CSW_HEGRENADE, 1)
  477. }
  478. case 4:
  479. {
  480. give_item(id, "weapon_fiveseven");
  481. give_item(id,"ammo_57mm");
  482. give_item(id,"ammo_57mm");
  483. give_item(id,"ammo_57mm");
  484. give_item(id,"ammo_57mm");
  485. give_item(id,"ammo_57mm");
  486. give_item(id, "weapon_hegrenade");
  487. give_item(id, "weapon_flashbang");
  488. give_item(id, "weapon_flashbang");
  489. cs_set_user_bpammo(id, CSW_HEGRENADE, 1)
  490. }
  491. case 5:
  492. {
  493. give_item(id, "weapon_elite");
  494. give_item(id,"ammo_9mm");
  495. give_item(id,"ammo_9mm");
  496. give_item(id,"ammo_9mm");
  497. give_item(id,"ammo_9mm");
  498. give_item(id, "weapon_hegrenade");
  499. give_item(id, "weapon_flashbang");
  500. give_item(id, "weapon_flashbang");
  501. cs_set_user_bpammo(id, CSW_HEGRENADE, 1)
  502. }
  503. }
  504. menu_destroy(menu);
  505. return PLUGIN_HANDLED;
  506. }
  507. stock ham_give_weapon(id,weapon[])
  508. {
  509. if(!equal(weapon,"weapon_",7)) return 0;
  510.  
  511. new wEnt = engfunc(EngFunc_CreateNamedEntity,engfunc(EngFunc_AllocString,weapon));
  512. if(!pev_valid(wEnt)) return 0;
  513.  
  514. set_pev(wEnt,pev_spawnflags,SF_NORESPAWN);
  515. dllfunc(DLLFunc_Spawn,wEnt);
  516.  
  517. if(!ExecuteHamB(Ham_AddPlayerItem,id,wEnt))
  518. {
  519. if(pev_valid(wEnt)) set_pev(wEnt,pev_flags,pev(wEnt,pev_flags) | FL_KILLME);
  520. return 0;
  521. }
  522. ExecuteHamB(Ham_Item_AttachToPlayer,wEnt,id)
  523. return 1;
  524. }
  525. stock ham_strip_weapon(id,weapon[])
  526. {
  527. if(!equal(weapon,"weapon_",7)) return 0;
  528.  
  529. new wId = get_weaponid(weapon);
  530. if(!wId) return 0;
  531.  
  532. new wEnt;
  533. while((wEnt = engfunc(EngFunc_FindEntityByString,wEnt,"classname",weapon)) && pev(wEnt,pev_owner) != id) {}
  534. if(!wEnt) return 0;
  535.  
  536. if(get_user_weapon(id) == wId) ExecuteHamB(Ham_Weapon_RetireWeapon,wEnt);
  537.  
  538. if(!ExecuteHamB(Ham_RemovePlayerItem,id,wEnt)) return 0;
  539. ExecuteHamB(Ham_Item_Kill,wEnt);
  540.  
  541. set_pev(id,pev_weapons,pev(id,pev_weapons) & ~(1<<wId));
  542. return 1;
  543. }
  544.  
  545. stock print_color(const id, const input[], any:...)
  546. {
  547. new count = 1, players[32]
  548. static msg[191]
  549. vformat(msg, 190, input, 3)
  550.  
  551. replace_all(msg, 190, "!g", "^4")
  552. replace_all(msg, 190, "!y", "^1")
  553. replace_all(msg, 190, "!t", "^3")
  554. replace_all(msg, 190, "á", "á")
  555. replace_all(msg, 190, "é", "Ă©")
  556. replace_all(msg, 190, "í", "Ă­")
  557. replace_all(msg, 190, "ó", "Ăł")
  558. replace_all(msg, 190, "ö", "ö")
  559. replace_all(msg, 190, "ő", "Ĺ‘")
  560. replace_all(msg, 190, "ú", "Ăş")
  561. replace_all(msg, 190, "ü", "ĂĽ")
  562. replace_all(msg, 190, "ű", "ű")
  563. replace_all(msg, 190, "Á", "Á")
  564. replace_all(msg, 190, "É", "É")
  565. replace_all(msg, 190, "Í", "ĂŤ")
  566. replace_all(msg, 190, "Ó", "Ă“")
  567. replace_all(msg, 190, "Ö", "Ă–")
  568. replace_all(msg, 190, "Ő", "Ő")
  569. replace_all(msg, 190, "Ú", "Ăš")
  570. replace_all(msg, 190, "Ü", "Ăś")
  571. replace_all(msg, 190, "Ű", "Ĺ°")
  572.  
  573. if (id) players[0] = id; else get_players(players, count, "ch")
  574. {
  575. for (new i = 0; i < count; i++)
  576. {
  577. if (is_user_connected(players[i]))
  578. {
  579. message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
  580. write_byte(players[i])
  581. write_string(msg)
  582. message_end()
  583. }
  584. }
  585. }
  586. return PLUGIN_HANDLED
  587. }
  588. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  589. *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1038\\ f0\\ fs16 \n\\ par }
  590. */
  591.  
  592.  
  593.  

Hát, nem is azért, de amit te küldtél az nekem ezt adta vissza(Az alap):
Kód:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

399c7584cab8e4429787fd048de5e108.sma(191) : warning 217: loose indentation
399c7584cab8e4429787fd048de5e108.sma(206) : warning 217: loose indentation
399c7584cab8e4429787fd048de5e108.sma(208) : error 017: undefined symbol "fegyvermenu"
399c7584cab8e4429787fd048de5e108.sma(212) : warning 217: loose indentation
399c7584cab8e4429787fd048de5e108.sma(215) : error 017: undefined symbol "fegyvermenu"
399c7584cab8e4429787fd048de5e108.sma(218) : warning 217: loose indentation
399c7584cab8e4429787fd048de5e108.sma(222) : error 017: undefined symbol "give_player_grenades"
399c7584cab8e4429787fd048de5e108.sma(237) : error 017: undefined symbol "fegyvermenu"
399c7584cab8e4429787fd048de5e108.sma(241) : error 002: only a single statement (or expression) can follow each "case"
399c7584cab8e4429787fd048de5e108.sma(244) : error 017: undefined symbol "fegyvermenu"
399c7584cab8e4429787fd048de5e108.sma(249) : error 010: invalid function or declaration
399c7584cab8e4429787fd048de5e108.sma(258) : warning 218: old style prototypes used with optional semicolumns
399c7584cab8e4429787fd048de5e108.sma(259) : error 054: unmatched closing brace
399c7584cab8e4429787fd048de5e108.sma(260) : error 010: invalid function or declaration
399c7584cab8e4429787fd048de5e108.sma(267) : warning 218: old style prototypes used with optional semicolumns
399c7584cab8e4429787fd048de5e108.sma(268) : error 054: unmatched closing brace
399c7584cab8e4429787fd048de5e108.sma(269) : error 010: invalid function or declaration
399c7584cab8e4429787fd048de5e108.sma(277) : warning 218: old style prototypes used with optional semicolumns
399c7584cab8e4429787fd048de5e108.sma(278) : error 054: unmatched closing brace
399c7584cab8e4429787fd048de5e108.sma(279) : error 010: invalid function or declaration
399c7584cab8e4429787fd048de5e108.sma(288) : warning 218: old style prototypes used with optional semicolumns
399c7584cab8e4429787fd048de5e108.sma(289) : error 054: unmatched closing brace
399c7584cab8e4429787fd048de5e108.sma(290) : error 010: invalid function or declaration
399c7584cab8e4429787fd048de5e108.sma(303) : warning 218: old style prototypes used with optional semicolumns
399c7584cab8e4429787fd048de5e108.sma(304) : error 054: unmatched closing brace
399c7584cab8e4429787fd048de5e108.sma(305) : error 010: invalid function or declaration
399c7584cab8e4429787fd048de5e108.sma(313) : warning 218: old style prototypes used with optional semicolumns
399c7584cab8e4429787fd048de5e108.sma(314) : error 054: unmatched closing brace
399c7584cab8e4429787fd048de5e108.sma(315) : error 010: invalid function or declaration
399c7584cab8e4429787fd048de5e108.sma(322) : warning 218: old style prototypes used with optional semicolumns
399c7584cab8e4429787fd048de5e108.sma(323) : error 054: unmatched closing brace
399c7584cab8e4429787fd048de5e108.sma(324) : error 010: invalid function or declaration
399c7584cab8e4429787fd048de5e108.sma(331) : warning 218: old style prototypes used with optional semicolumns
399c7584cab8e4429787fd048de5e108.sma(332) : error 054: unmatched closing brace
399c7584cab8e4429787fd048de5e108.sma(333) : error 010: invalid function or declaration
399c7584cab8e4429787fd048de5e108.sma(340) : warning 218: old style prototypes used with optional semicolumns
399c7584cab8e4429787fd048de5e108.sma(341) : error 054: unmatched closing brace
399c7584cab8e4429787fd048de5e108.sma(342) : error 010: invalid function or declaration
399c7584cab8e4429787fd048de5e108.sma(348) : warning 218: old style prototypes used with optional semicolumns
399c7584cab8e4429787fd048de5e108.sma(349) : error 054: unmatched closing brace

Compilation aborted.
26 Errors.
Could not locate output file 399c7584cab8e4429787fd048de5e108.amx (compile failed).


_________________
Ha segítettem: Kép

Kép

Ők köszönték meg White#Angel nek ezt a hozzászólást: alfanero (2014.01.29. 17:39)
  Népszerűség: 2.27%


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: 1 fegyver
HozzászólásElküldve: 2014.01.29. 16:52 
Offline
Nagyúr
Avatar

Csatlakozott: 2013.03.28. 20:32
Hozzászólások: 561
Megköszönt másnak: 59 alkalommal
Megköszönték neki: 56 alkalommal
Most megnéztem kiszedtem belőle az awp limitet amit megprobáltam belle írni és ugy hiba nélkül leforditja,Megtanulok és utána tesztelem h jó-e, Azt meglehet még oldani,hogy a ct-k kapjanak ingyen defet?

_________________
Kép

[steam]alfaaaa[/steam]


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: 1 fegyver
HozzászólásElküldve: 2014.01.29. 17:26 
Offline
Őskövület
Avatar

Csatlakozott: 2012.02.27. 09:42
Hozzászólások: 2588
Megköszönt másnak: 25 alkalommal
Megköszönték neki: 418 alkalommal
Használd Silent fegyvermenüjét RsN -é alapból hibás..

_________________
Kép


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: 1 fegyver
HozzászólásElküldve: 2014.01.29. 17:28 
Offline
Nagyúr
Avatar

Csatlakozott: 2013.03.28. 20:32
Hozzászólások: 561
Megköszönt másnak: 59 alkalommal
Megköszönték neki: 56 alkalommal
De enekm olyan kell amire a pisztolyt is külön lehet választani olyat Silent-es be nem találtam

_________________
Kép

[steam]alfaaaa[/steam]


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: 1 fegyver
HozzászólásElküldve: 2014.01.29. 17:44 
Offline
Tud valamit

Csatlakozott: 2012.04.16. 22:32
Hozzászólások: 104
Megköszönt másnak: 14 alkalommal
Megköszönték neki: 10 alkalommal
Akkor nyiss egy olyan témát, ahol a Silent által írt plugin forráskódját illeszted be, és megkéred, hogy valaki írja át, úgy hogy etc...

_________________
Ha segítettem: Kép

Kép


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: 1 fegyver
HozzászólásElküldve: 2014.02.01. 21:47 
Offline
Nagyúr
Avatar

Csatlakozott: 2013.03.28. 20:32
Hozzászólások: 561
Megköszönt másnak: 59 alkalommal
Megköszönték neki: 56 alkalommal
meik az a pár sor?és hova került?

_________________
Kép

[steam]alfaaaa[/steam]


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  [ 10 hozzászólás ] 


Ki van itt

Jelenlévő fórumozók: nincs regisztrált felhasználó valamint 7 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