hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2024.04.25. 16:05



Jelenlévő felhasználók

Jelenleg 302 felhasználó van jelen :: 1 regisztrált, 0 rejtett és 301 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] 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: War3Ft sma átalakítása
HozzászólásElküldve: 2013.09.06. 15:25 
Offline
Félisten

Csatlakozott: 2012.06.19. 15:12
Hozzászólások: 926
Megköszönt másnak: 109 alkalommal
Megköszönték neki: 31 alkalommal
Próbáltam átalakitani az oldalon található war3ft mód sma ját de nem engedte ezt írta

/src/textgySMlh.sma(28) : fatal error 100: cannot read from file: "war3ft/constants.inl"

hogyan tudnám átalakitani?
SMA Forráskód: [ Mindet kijelol ]
  1. /* AMX Mod X
  2. * Warcraft 3 Frozen Throne
  3. *
  4. * by Geesu
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms of the GNU General Public License as published by the
  8. * Free Software Foundation; either version 2 of the License, or (at
  9. * your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful, but
  12. * WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software Foundation,
  18. * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  19. *
  20. * In addition, as a special exception, the author gives permission to
  21. * link the code of this program with the Half-Life Game Engine ("HL
  22. * Engine") and Modified Game Libraries ("MODs") developed by Valve,
  23. * L.L.C ("Valve"). You must obey the GNU General Public License in all
  24. * respects for all of the code used other than the HL Engine and MODs
  25. * from Valve. If you modify this file, you may extend this exception
  26. * to your version of the file, but you are not obligated to do so. If
  27. * you do not wish to do so, delete this exception statement from your
  28. * version.
  29. */
  30.  
  31. #pragma tabsize 0
  32. //#pragma semicolon 1
  33.  
  34. new const WC3NAME[] = "Warcraft 3 Frozen Throne";
  35. new const WC3AUTHOR[] = "Geesu & Avanderik";
  36. new const WC3VERSION[] = "3.0 RC8";
  37. new const WC3DATE[] = __DATE__;
  38.  
  39. // Let AMX X know that we NEED these modules (as of amx x 1.75)
  40. #pragma reqclass xstats
  41. #pragma reqlib engine
  42. #pragma reqlib fun
  43. #pragma reqlib fakemeta
  44. #pragma reqlib cstrike
  45. #pragma reqlib dodfun
  46. #pragma loadlib sqlite
  47. #pragma loadlib mysql
  48.  
  49. #include <amxmodx>
  50. #include <amxmisc>
  51. #include <engine>
  52. #include <fun>
  53. #include <fakemeta>
  54. #include <cstrike>
  55. #include <dodfun>
  56. #include <dodx>
  57. #include <dbi>
  58. #include <sqlx>
  59.  
  60. // Header files that contain function declarations and variables
  61. #include "war3ft/constants.inl"
  62. #include "war3ft/db/db_common.h"
  63. #include "war3ft/db/db_mysqlx.h"
  64. #include "war3ft/db/db_sqlite.h"
  65. #include "war3ft/items.h"
  66. #include "war3ft/dod_h.inl"
  67. #include "war3ft/XP.h"
  68. #include "war3ft/war3ft.h"
  69. #include "war3ft/cstrike.h"
  70. #include "war3ft/menus.h"
  71. #include "war3ft/shared.h"
  72. #include "war3ft/ultimates.h"
  73.  
  74. // Source Code
  75. #include "war3ft/cvar.inl"
  76.  
  77. #include "war3ft/race_undead.inl" // Undead Scourge - 1
  78. #include "war3ft/race_human.inl" // Human Alliance - 2
  79. #include "war3ft/race_orc.inl" // Orcish Horde - 3
  80. #include "war3ft/race_elf.inl" // Night Elf - 4
  81. #include "war3ft/race_blood.inl" // Blood Mage - 5
  82. #include "war3ft/race_shadow.inl" // Shadow Hunter - 6
  83. #include "war3ft/race_warden.inl" // Warden - 7
  84. #include "war3ft/race_crypt.inl" // Crypt Lord - 8
  85. #include "war3ft/race_chameleon.inl" // Chameleon - 9
  86.  
  87. #include "war3ft/forwards.inl"
  88. #include "war3ft/effects.inl"
  89. #include "war3ft/XP.inl"
  90. #include "war3ft/db/db_mysqlx.inl"
  91. #include "war3ft/db/db_sqlite.inl"
  92. #include "war3ft/db/db_common.inl"
  93. #include "war3ft/war3ft.inl"
  94. #include "war3ft/events.inl"
  95. #include "war3ft/clientCommands.inl"
  96. #include "war3ft/items.inl"
  97. #include "war3ft/stocks.inl"
  98. #include "war3ft/shared.inl"
  99. #include "war3ft/menus.inl"
  100. #include "war3ft/motd.inl"
  101. #include "war3ft/language.inl"
  102. #include "war3ft/admin.inl"
  103. #include "war3ft/ultimates.inl"
  104. #include "war3ft/util.inl"
  105. #include "war3ft/skill_manager.inl"
  106.  
  107. #include "war3ft/cstrike.inl"
  108. #include "war3ft/dod.inl"
  109.  
  110. public plugin_init()
  111. {
  112. register_plugin( WC3NAME, WC3VERSION, WC3AUTHOR );
  113.  
  114. WC3_DetermineGame();
  115.  
  116. gmsgDeathMsg = get_user_msgid( "DeathMsg" );
  117. gmsgScreenFade = get_user_msgid( "ScreenFade" );
  118. gmsgScreenShake = get_user_msgid( "ScreenShake" );
  119. gmsgScoreInfo = get_user_msgid( "ScoreInfo" );
  120.  
  121.  
  122. register_concmd( "playerskills" , "CMD_Handler" , -1 );
  123.  
  124. register_clcmd( "debug" , "CMD_Handler" , -1 );
  125. register_clcmd( "levitation" , "CMD_Handler" , -1 );
  126. register_clcmd( "war3menu" , "CMD_Handler" , -1 );
  127. register_clcmd( "changerace" , "CMD_Handler" , -1 );
  128. register_clcmd( "selectskill" , "CMD_Handler" , -1 );
  129. register_clcmd( "skillsinfo" , "CMD_Handler" , -1 );
  130. register_clcmd( "resetskills" , "CMD_Handler" , -1 );
  131. register_clcmd( "resetxp" , "CMD_Handler" , -1 );
  132. register_clcmd( "itemsinfo" , "CMD_Handler" , -1 );
  133. register_clcmd( "itemsinfo2" , "CMD_Handler" , -1 );
  134. register_clcmd( "shopmenu" , "CMD_Handler" , -1 );
  135. register_clcmd( "shopmenu2" , "CMD_Handler" , -1 );
  136. register_clcmd( "ability" , "CMD_Handler" , -1 );
  137. register_clcmd( "rings" , "CMD_Handler" , -1 );
  138. register_clcmd( "level" , "CMD_Handler" , -1 );
  139. register_clcmd( "say" , "cmd_Say" , -1 );
  140. register_clcmd( "say_team" , "cmd_Say" , -1 );
  141. register_clcmd( "war3help" , "CMD_Handler" , -1 );
  142. register_clcmd( "ultimate" , "cmd_Ultimate" , -1 );
  143. register_clcmd( "fullupdate" , "cmd_fullupdate" , -1 );
  144. register_clcmd( "drop" , "on_Drop" , -1 );
  145. register_clcmd( "jointeam" , "cmd_Jointeam" , -1 );
  146.  
  147. // Admin Commands
  148. register_concmd( "wc3_givexp" , "ADMIN_Handler" , -1 , " -- Gives XP to players" );
  149. register_concmd( "wc3_setlevel" , "ADMIN_Handler" , -1 , " -- Sets a player's level" );
  150. register_concmd( "wc3_giveitem" , "ADMIN_Handler" , -1 , " -- Gives an item to a player" );
  151. register_concmd( "wc3_enable" , "ADMIN_Handler" , -1 , " -- Enables war3ft" );
  152. register_concmd( "wc3_disable" , "ADMIN_Handler" , -1 , " -- Disables war3ft" );
  153.  
  154. // Depreciated Admin Commands
  155. register_concmd( "amx_givexp" , "ADMIN_Handler" , -1 , " -- Gives XP to players" );
  156.  
  157. // Server Admin Commands (used by external plugins)
  158. register_srvcmd( "amx_takexp" , "ADMIN_ServerHandler" );
  159. register_srvcmd( "changexp" , "ADMIN_ServerHandler" );
  160.  
  161. // Register forwards (from fakemeta)
  162. register_forward( FM_TraceLine , "TRIGGER_TraceLine" );
  163.  
  164. register_event( "DeathMsg" , "on_DeathMsg" , "a" );
  165. register_event( "CurWeapon" , "on_CurWeapon" , "be" , "1=1" );
  166. register_event( "HideWeapon" , "on_CurWeapon" , "b" );
  167. register_event( "ResetHUD" , "on_ResetHud" , "b" );
  168. register_event( "TextMsg" , "on_GameRestart" , "a" , "2&#Game_will_restart_in" );
  169. register_event( "HLTV" , "EVENT_NewRound" , "a" , "1=0" , "2=0" );
  170.  
  171. register_dictionary( "war3FT.txt")
  172.  
  173. // Game Specific Initialization
  174. if ( g_MOD == GAME_CSTRIKE || g_MOD == GAME_CZERO )
  175. {
  176. gmsgBarTime = get_user_msgid( "BarTime" );
  177. gmsgStatusText = get_user_msgid( "StatusText" );
  178. gmsgStatusIcon = get_user_msgid( "StatusIcon" );
  179.  
  180. register_logevent( "on_PlayerAction" , 3 , "1=triggered" );
  181. register_logevent( "on_FreezeTimeComplete" , 2 , "0=World triggered" , "1=Round_Start" );
  182. register_logevent( "on_EndRound" , 2 , "0=World triggered" , "1=Round_End" );
  183.  
  184. register_event( "SendAudio" , "on_TerroristWin" , "a" , "2=%!MRAD_terwin" );
  185. register_event( "SendAudio" , "on_CTWin" , "a" , "2=%!MRAD_ctwin" );
  186. register_event( "ArmorType" , "on_ArmorType" , "be" );
  187. register_event( "Battery" , "on_Battery" , "be" );
  188. register_event( "WeapPickup" , "on_WeapPickup" , "b" );
  189. register_event( "StatusValue" , "on_ShowStatus" , "be" , "1=2" ,"2!0" );
  190. register_event( "StatusValue" , "on_HideStatus" , "be" , "1=1" ,"2=0" );
  191. register_event( "SetFOV" , "on_Zoom" , "be" );
  192. register_event( "BarTime" , "on_BombPlanting" , "be" , "1=3" );
  193. register_event( "BarTime" , "on_BombStopPlanting" , "b" , "1=0" );
  194.  
  195. // Old Style
  196. register_menucmd( register_menuid( "BuyItem" ) , (1<<3) , "cmd_hegren" );
  197.  
  198. // VGUI
  199. register_menucmd( -34 , (1<<3) , "cmd_hegren" );
  200.  
  201. // Steam
  202. register_clcmd( "hegren" , "cmd_hegren" );
  203.  
  204. // Old style menu (now its jointeam client command)
  205. register_menucmd( register_menuid( "Team_Select" , 1 ) , (1<<0)|(1<<1)|(1<<4) , "cmd_Teamselect" );
  206.  
  207. // Condition Zero
  208. if ( g_MOD == GAME_CZERO )
  209. {
  210. register_event("TextMsg", "on_GameRestart", "a", "2&#Game_Commencing")
  211. }
  212. // Counter-Strike
  213. else
  214. {
  215. register_event("TextMsg", "on_GameRestart", "a", "2&#Game_C")
  216. }
  217. }
  218. else if ( g_MOD == GAME_DOD )
  219. {
  220. gmsgHudText = get_user_msgid( "HudText" );
  221.  
  222. register_statsfwd( XMF_SCORE );
  223. register_statsfwd( XMF_DAMAGE );
  224.  
  225. register_event( "RoundState" , "EVENT_DOD_EndRound" , "a" , "1=3" , "1=4" );
  226. }
  227.  
  228. // Plugin initialization procedures
  229. WC3_Init();
  230.  
  231. register_concmd( "test", "test" );
  232. register_concmd( "test2", "test2" );
  233. }
  234.  
  235. public test2(id)
  236. {
  237. client_print( id, print_chat, "[DEBUG] Insert ID: %d", DB_GetUniqueID( id ) );
  238. }
  239.  
  240. public test(id)
  241. {
  242. new players[32], num, i, szName[32];
  243. get_players( players, num );
  244.  
  245. for ( i = 0; i < num; i++ )
  246. {
  247. get_user_name( players[i], szName, 31 );
  248.  
  249. WC3_Log( true, "**** %s ****", szName );
  250.  
  251. SM_DebugPrint( players[i] );
  252.  
  253. WC3_Log( true, " %s ", szName );
  254. }
  255. }
  256.  
  257. public plugin_end()
  258. {
  259. new szCurMap[32];
  260. get_mapname( szCurMap, 31 );
  261. WC3_Log( false, "** Map '%s' ended", szCurMap );
  262.  
  263. if ( !WC3_Check() )
  264. {
  265. return;
  266. }
  267.  
  268. if ( !get_pcvar_num( CVAR_wc3_save_xp ) )
  269. {
  270. return;
  271. }
  272.  
  273. FWD_Destroy();
  274. DB_SaveAll( false );
  275. DB_Prune();
  276. DB_Close();
  277.  
  278. return;
  279. }
  280.  
  281. public plugin_precache()
  282. {
  283. WC3_Precache();
  284. }
  285.  
  286. public client_putinserver( id )
  287. {
  288. if ( !WC3_Check() )
  289. {
  290. return;
  291. }
  292.  
  293. // Check for steam ID pending
  294. static szPlayerID[32];
  295. get_user_authid( id, szPlayerID, 31 );
  296.  
  297. // Then the player doesn't have a steam id, lets make them reconnect
  298. if ( equal(szPlayerID, "STEAM_ID_PENDING") )
  299. {
  300. client_cmd( id, "reconnect" );
  301. }
  302.  
  303. // Get the user's ID!
  304. DB_FetchUniqueID( id );
  305.  
  306. p_data_b[id][PB_ISCONNECTED] = true;
  307.  
  308. if ( g_MOD == GAME_CSTRIKE || g_MOD == GAME_CZERO )
  309. {
  310. // Check user's cvar if the user isn't a bot and if we're not running a 64-bit server
  311. if ( !is_user_bot( id ) && !is_amd64_server() )
  312. {
  313. query_client_cvar( id, "cl_minmodels", "_CS_CheckMinModelsValue" );
  314. }
  315. }
  316.  
  317. // Start showing the user their money
  318. else if ( g_MOD == GAME_DOD )
  319. {
  320. p_data[id][P_MONEY] = get_pcvar_num( CVAR_wc3_dod_start_money );
  321. static parm[3];
  322. parm[0] = id;
  323. parm[1] = 0;
  324. _DOD_showMoney( parm );
  325. }
  326.  
  327. return;
  328. }
  329.  
  330. public client_connect( id )
  331. {
  332. if ( !WC3_Check() )
  333. {
  334. return;
  335. }
  336.  
  337. // Initialize this player
  338. WC3_PlayerInit( id );
  339.  
  340. client_cmd( id, "hud_centerid 0" );
  341.  
  342.  
  343. p_data[id][P_RESPAWNBY] = 0;
  344. p_data[id][P_SPECMODE] = 0;
  345.  
  346. p_data_b[id][PB_ISBURNING] = false;
  347. p_data_b[id][PB_JUSTJOINED] = true;
  348. p_data_b[id][PB_CAN_RENDER] = true;
  349. p_data_b[id][PB_HAS_SPAWNED] = false;
  350. p_data_b[id][PB_SKINSWITCHED] = false;
  351.  
  352. // User should have no items on connect...
  353. g_iShopMenuItems[id][0] = -1;
  354. g_iShopMenuItems[id][1] = -1;
  355.  
  356. // Automatically set their XP if it's enabled
  357. if ( get_pcvar_num( CVAR_wc3_xp_auto_average ) && !get_pcvar_num( CVAR_wc3_save_xp ) )
  358. {
  359. new iTotalXP;
  360. new iNum, i;
  361. for( i = 1; i <= MAXPLAYERS; i++ )
  362. {
  363. if ( p_data[i][P_XP] > 0 )
  364. {
  365. iNum++;
  366. iTotalXP += p_data[i][P_XP];
  367. }
  368. }
  369. if ( iNum > 0 && iTotalXP > 0 )
  370. {
  371. p_data[id][P_XP] = iTotalXP/iNum;
  372. }
  373. }
  374.  
  375. if ( g_MOD == GAME_CSTRIKE || g_MOD == GAME_CZERO )
  376. {
  377. p_data[id][P_HECOUNT] = 0;
  378. p_data[id][P_FLASHCOUNT] = 0;
  379. }
  380. else if ( g_MOD == GAME_DOD )
  381. {
  382. p_data[id][P_MONEY] = 0;
  383. }
  384.  
  385. // Reset the "cheat" variables
  386. new j;
  387. for ( j = 0; j < MAX_RACES; j++ )
  388. {
  389. g_bGivenLevel10[id][j] = false;
  390. }
  391.  
  392. CS_GetIcon( id );
  393.  
  394. return;
  395. }
  396.  
  397. public client_disconnect( id )
  398. {
  399. if ( !WC3_Check() )
  400. {
  401. return;
  402. }
  403.  
  404. // Update the user's timestamps for each race if we're saving XP
  405. DB_UpdateTimestamp( id );
  406.  
  407. // Remove the money task when a user disconnects
  408. if ( g_MOD == GAME_DOD )
  409. {
  410. task_exists( TASK_MONEYLOOP + id ) ? remove_task( TASK_MONEYLOOP + id ) : 0;
  411. }
  412.  
  413. p_data[id][P_SPECMODE] = 0;
  414. p_data_b[id][PB_ISBURNING] = false;
  415. p_data_b[id][PB_DIEDLASTROUND] = false;
  416. p_data_b[id][PB_JUSTJOINED] = false;
  417. p_data_b[id][PB_ISCONNECTED] = false;
  418. bIgnoreArmorSet[id] = false;
  419.  
  420. // Reset xp assist
  421. for ( new i = 0; i < MAXPLAYERS; i++ )
  422. {
  423. g_iDamageDealt[id][i] = 0;
  424. }
  425.  
  426. // Save the user's XP if we have XP to save
  427. if ( get_pcvar_num( CVAR_wc3_save_xp ) && !is_user_bot(id) && p_data[id][P_RACE] && p_data[id][P_XP] )
  428. {
  429. DB_SaveXP( id, true );
  430. }
  431.  
  432. if ( get_pcvar_num( CVAR_wc3_psychostats ) )
  433. {
  434. static szWeapon[64];
  435.  
  436. static szTeam[16], szName[32], szAuthid[32];
  437. new iWeap, iUserid = get_user_userid( id );
  438.  
  439. if ( is_user_connected(id) )
  440. {
  441. get_user_team( id, szTeam, 15 );
  442. }
  443. get_user_name( id, szName, 31 );
  444. get_user_authid( id, szAuthid, 31 );
  445.  
  446. for ( iWeap = CSW_WAR3_MIN; iWeap <=CSW_WAR3_MAX; iWeap++ )
  447. {
  448. format( szWeapon, 63, "" );
  449.  
  450. switch( iWeap )
  451. {
  452. case CSW_LIGHTNING: LANG_GetSkillName( ULTIMATE_CHAINLIGHTNING , LANG_SERVER, szWeapon , 63, 20 );
  453. case CSW_SUICIDE: LANG_GetSkillName( ULTIMATE_SUICIDE , LANG_SERVER, szWeapon , 63, 21 );
  454. case CSW_IMMOLATE: LANG_GetSkillName( ULTIMATE_IMMOLATE , LANG_SERVER, szWeapon , 63, 22 );
  455. case CSW_LOCUSTS: LANG_GetSkillName( ULTIMATE_LOCUSTSWARM , LANG_SERVER, szWeapon , 63, 23 );
  456. case CSW_SERPENTWARD: LANG_GetSkillName( SKILL_SERPENTWARD , LANG_SERVER, szWeapon , 63, 24 );
  457. case CSW_SHADOW: LANG_GetSkillName( SKILL_SHADOWSTRIKE , LANG_SERVER, szWeapon , 63, 25 );
  458. case CSW_THORNS: LANG_GetSkillName( SKILL_THORNS , LANG_SERVER, szWeapon , 63, 26 );
  459. case CSW_CARAPACE: LANG_GetSkillName( SKILL_SPIKEDCARAPACE , LANG_SERVER, szWeapon , 63, 27 );
  460. case CSW_CARRION: LANG_GetSkillName( SKILL_CARRIONBEETLES , LANG_SERVER, szWeapon , 63, 28 );
  461. case CSW_ORB: LANG_GetSkillName( PASS_ORB , LANG_SERVER, szWeapon , 63, 29 );
  462. case CSW_CONCOCTION: LANG_GetSkillName( PASS_UNSTABLECONCOCTION , LANG_SERVER, szWeapon , 63, 30 );
  463. }
  464.  
  465. replace( szWeapon, 63, " ", "_" );
  466.  
  467. new WEAPON = iWeap - CSW_WAR3_MIN;
  468.  
  469. if ( iStatsShots[id][WEAPON] || iStatsHits[id][WEAPON] || iStatsKills[id][WEAPON] || iStatsHS[id][WEAPON] || iStatsTKS[id][WEAPON] || iStatsDamage[id][WEAPON] || iStatsDeaths[id][WEAPON] || iStatsHead[id][WEAPON] || iStatsChest[id][WEAPON] || iStatsStomach[id][WEAPON] || iStatsLeftArm[id][WEAPON] || iStatsRightArm[id][WEAPON] || iStatsLeftLeg[id][WEAPON] || iStatsRightLeg[id][WEAPON] )
  470. {
  471.  
  472. // Counter-Strike/Condition Zero log format is different than the DOD
  473. if ( g_MOD == GAME_CSTRIKE || g_MOD == GAME_CZERO )
  474. {
  475. log_message("^"%s<%d><%s><%s>^" triggered ^"weaponstats^" (weapon ^"%s^") (shots ^"%d^") (hits ^"%d^") (kills ^"%d^") (headshots ^"%d^") (tks ^"%d^") (damage ^"%d^") (deaths ^"%d^")", szName, iUserid, szAuthid, szTeam, szWeapon, iStatsShots[id][WEAPON], iStatsHits[id][WEAPON], iStatsKills[id][WEAPON], iStatsHS[id][WEAPON], iStatsTKS[id][WEAPON], iStatsDamage[id][WEAPON], iStatsDeaths[id][WEAPON] );
  476. }
  477.  
  478. // Day of Defeat log format
  479. else if ( g_MOD == GAME_DOD )
  480. {
  481. log_message("^"%s<%d><%s><%s>^" triggered ^"weaponstats^" (weapon ^"%s^") (shots ^"%d^") (hits ^"%d^") (kills ^"%d^") (headshots ^"%d^") (tks ^"%d^") (damage ^"%d^") (deaths ^"%d^") (score ^"%d^")", szName, iUserid, szAuthid, szTeam, szWeapon, iStatsShots[id][WEAPON], iStatsHits[id][WEAPON], iStatsKills[id][WEAPON], iStatsHS[id][WEAPON], iStatsTKS[id][WEAPON], iStatsDamage[id][WEAPON], iStatsDeaths[id][WEAPON], 0 );
  482. }
  483.  
  484. log_message("^"%s<%d><%s><%s>^" triggered ^"weaponstats2^" (weapon ^"%s^") (head ^"%d^") (chest ^"%d^") (stomach ^"%d^") (leftarm ^"%d^") (rightarm ^"%d^") (leftleg ^"%d^") (rightleg ^"%d^")", szName, iUserid, szAuthid, szTeam, szWeapon, iStatsHead[id][WEAPON], iStatsChest[id][WEAPON], iStatsStomach[id][WEAPON], iStatsLeftArm[id][WEAPON], iStatsRightArm[id][WEAPON], iStatsLeftLeg[id][WEAPON], iStatsRightLeg[id][WEAPON] );
  485.  
  486. iStatsShots[id][WEAPON] = 0;
  487. iStatsHits[id][WEAPON] = 0;
  488. iStatsKills[id][WEAPON] = 0;
  489. iStatsHS[id][WEAPON] = 0;
  490. iStatsTKS[id][WEAPON] = 0;
  491. iStatsDamage[id][WEAPON] = 0;
  492. iStatsDeaths[id][WEAPON] = 0;
  493. iStatsHead[id][WEAPON] = 0;
  494. iStatsChest[id][WEAPON] = 0;
  495. iStatsStomach[id][WEAPON] = 0;
  496. iStatsLeftArm[id][WEAPON] = 0;
  497. iStatsRightArm[id][WEAPON] = 0;
  498. iStatsLeftLeg[id][WEAPON] = 0;
  499. iStatsRightLeg[id][WEAPON] = 0;
  500. }
  501. }
  502. }
  503. }
  504.  
  505. public client_PreThink( id )
  506. {
  507. if ( !WC3_Check() )
  508. {
  509. return;
  510. }
  511.  
  512. if ( p_data_b[id][PB_ISCONNECTED] )
  513. {
  514. if ( is_user_alive( id ) )
  515. {
  516.  
  517. // Counter-Strike or Condition Zero
  518. if ( g_MOD == GAME_CSTRIKE || g_MOD == GAME_CZERO )
  519. {
  520.  
  521. // This is used so we can't hear the undead's footsteps at level 3
  522. if ( SM_GetSkillLevel( id, SKILL_UNHOLYAURA ) > 0 && !p_data_b[id][PB_STUNNED] && !p_data_b[id][PB_SLOWED] )
  523. {
  524. new Float:vel[3];
  525. entity_get_vector( id, EV_VEC_velocity, vel );
  526.  
  527. // When this is true, the user is walking... lets hope <!-- s:P --><img src=\"{SMILIES_PATH}/icon_razz.gif\" alt=\":P\" title=\"vicces\" /><!-- s:P -->
  528. if ( vector_length( vel ) < 180.0 )
  529. {
  530. entity_set_int( id, EV_INT_flTimeStepSound, 999 );
  531. }
  532.  
  533. // Otherwise if we just set it on the previous tick we need to set it back
  534. else if ( entity_get_int(id, EV_INT_flTimeStepSound) > 500 )
  535. {
  536. entity_set_int( id, EV_INT_flTimeStepSound, 200 );
  537. }
  538. }
  539. }
  540.  
  541. // Day of Defeat
  542. else if ( g_MOD == GAME_DOD )
  543. {
  544.  
  545. // Set the user's speed
  546. SHARED_SetSpeed( id );
  547.  
  548. static iSkillLevel;
  549. iSkillLevel = SM_GetSkillLevel( id, SKILL_UNHOLYAURA );
  550.  
  551. // Give the user more stamina
  552. if ( iSkillLevel > 0 )
  553. {
  554. if ( entity_get_float( id, EV_FL_fuser4 ) < p_unholy_dod[iSkillLevel-1] )
  555. {
  556. entity_set_float( id, EV_FL_fuser4, p_unholy_dod[iSkillLevel-1] );
  557. }
  558.  
  559. }
  560.  
  561. // Give the user more stamina
  562. if ( ITEM_Has( id, ITEM_BOOTS ) > ITEM_NONE && entity_get_float( id, EV_FL_fuser4 ) < DOD_BOOT_SPEED )
  563. {
  564. entity_set_float( id, EV_FL_fuser4, DOD_BOOT_SPEED );
  565. }
  566. }
  567.  
  568. // Amulet of the Cat
  569. if ( ITEM_Has( id, ITEM_AMULET ) > ITEM_NONE )
  570. {
  571. entity_set_int( id, EV_INT_flTimeStepSound, 999 );
  572. }
  573. }
  574.  
  575. // User is dead
  576. else
  577. {
  578.  
  579. // Check to see if spectated player has changed
  580. new iTarget = entity_get_int( id, EV_INT_iuser2 );
  581.  
  582. new Float:fTime = halflife_time();
  583.  
  584. // Then we are looking at a new player or the last hud message has disappeared
  585. if ( g_iSpectatingID[id] != iTarget || g_fLastSpecDisplay[id] <= fTime )
  586. {
  587.  
  588. // We have a valid target!!
  589. if ( SHARED_ValidPlayer( iTarget ) && iTarget != id )
  590. {
  591. WC3_ShowSpecInfo( id, iTarget );
  592.  
  593. g_fLastSpecDisplay[id] = fTime + SPEC_HOLDTIME;
  594. }
  595.  
  596. g_iSpectatingID[id] = iTarget;
  597. }
  598. }
  599. }
  600.  
  601. return;
  602. }
  603.  
  604. public plugin_natives()
  605. {
  606. set_module_filter( "module_filter" );
  607. set_native_filter( "native_filter" );
  608. set_error_filter( "error_filter" );
  609. }
  610.  
  611. public error_filter( error_code, bool:debugging, message[] )
  612. {
  613. new szBuffer[256];
  614. dbg_fmt_error( szBuffer, 255 );
  615.  
  616. log_amx( "[ERROR] '%s' '%d' '%d' '%s'", message, error_code, debugging, szBuffer );
  617.  
  618. //L 12/27/2006 - 16:48:08: [war3ft.amxx] [ERROR] '[CSTRIKE] Invalid player 5' '10' '1' 'Run time error 10: native error (native "cs_set_user_money")'
  619.  
  620. // We want to ignore invalid player messages that are generated by cstrike! - they're annoying + don't actually matter all that much...
  621. /*if ( error_code == AMX_ERR_NATIVE )
  622. {
  623. if ( containi( message, "" ) )
  624. {
  625. }
  626. }*/
  627. }
  628.  
  629. public module_filter( const module[] )
  630. {
  631. WC3_DetermineGame();
  632.  
  633. // We don't need the cstrike module when we're DOD
  634. if ( g_MOD == GAME_DOD && equal( module, "cstrike" ) )
  635. {
  636. return PLUGIN_HANDLED;
  637. }
  638.  
  639. // And we don't need any dod modules when we're in CS/CZ!
  640. else if ( ( g_MOD == GAME_CSTRIKE || g_MOD == GAME_CZERO ) && equal( module, "dodfun" ) )
  641. {
  642. return PLUGIN_HANDLED;
  643. }
  644.  
  645. // We don't need to display a message, we'll display it later if we need to (when the DB is set up if XP Saving is on)
  646. else if ( equal( module, "dbi" ) || equal( module, "sqlx" ) )
  647. {
  648. return PLUGIN_HANDLED;
  649. }
  650.  
  651. // Dammit plugin can't load now :/ - technically we should never get here unless the module doesn't exist in the modules folder
  652. else
  653. {
  654. WC3_Log( true, "Please enable the '%s' module in your modules.ini file", module );
  655.  
  656. return PLUGIN_CONTINUE;
  657. }
  658.  
  659. return PLUGIN_HANDLED;
  660. }
  661.  
  662. public native_filter( const name[], index, trap )
  663. {
  664. if ( !trap )
  665. {
  666. return PLUGIN_HANDLED;
  667. }
  668.  
  669. return PLUGIN_CONTINUE;
  670. }
  671.  

_________________
Kép


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: War3Ft sma átalakítása
HozzászólásElküldve: 2013.09.06. 21:33 
Offline
Jómunkásember
Avatar

Csatlakozott: 2013.01.15. 19:04
Hozzászólások: 407
Megköszönt másnak: 17 alkalommal
Megköszönték neki: 176 alkalommal
Online fordítót használsz? Ott nem is fog menni mivel nincs fent a constants.inl file!
Ha nem akkor a constants.inl filet rakd be a scripting/include/war3ft mapába és akkor próbáld!


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: War3Ft sma átalakítása
HozzászólásElküldve: 2013.09.06. 22:07 
Offline
Felfüggesztve
Avatar

Csatlakozott: 2013.06.09. 18:47
Hozzászólások: 2004
Megköszönt másnak: 1 alkalommal
Megköszönték neki: 220 alkalommal
demon írta:
Online fordítót használsz? Ott nem is fog menni mivel nincs fent a constants.inl file!
Ha nem akkor a constants.inl filet rakd be a scripting/include/war3ft mapába és akkor próbáld!

egyszerübb ha Amx stúdióval alakítod át. Elötte rakd be a constants.ini -t nem inl.. Stúdió lefordítja! Lehet hogy rosszúl tudom, de az nem ini akart lenni? Inl ről még nem hallotam.

_________________
Ha elnyerte valamelyik témában a hozzászólásom a tetszésedet melyet olvastál, akkor egy egyszerű gombnyomással kifejezheted, hogy tetszett.


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: War3Ft sma átalakítása
HozzászólásElküldve: 2013.09.06. 22:11 
Offline
Félisten

Csatlakozott: 2012.06.19. 15:12
Hozzászólások: 926
Megköszönt másnak: 109 alkalommal
Megköszönték neki: 31 alkalommal
demon írta:
Online fordítót használsz? Ott nem is fog menni mivel nincs fent a constants.inl file!
Ha nem akkor a constants.inl filet rakd be a scripting/include/war3ft mapába és akkor próbáld!


Belinkelnéd hogy milyen forditót használjak hozzá.

_________________
Kép


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: War3Ft sma átalakítása
HozzászólásElküldve: 2013.09.06. 22:13 
Offline
Félisten

Csatlakozott: 2012.06.19. 15:12
Hozzászólások: 926
Megköszönt másnak: 109 alkalommal
Megköszönték neki: 31 alkalommal
Anonymous1337 írta:
demon írta:
Online fordítót használsz? Ott nem is fog menni mivel nincs fent a constants.inl file!
Ha nem akkor a constants.inl filet rakd be a scripting/include/war3ft mapába és akkor próbáld!

egyszerübb ha Amx stúdióval alakítod át. Elötte rakd be a constants.ini -t nem inl.. Stúdió lefordítja! Lehet hogy rosszúl tudom, de az nem ini akart lenni? Inl ről még nem hallotam.


inl nem ini
fatal error 100: cannot read from file: "war3ft/constants.inl"

_________________
Kép


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: War3Ft sma átalakítása
HozzászólásElküldve: 2013.09.07. 07:04 
Offline
Felfüggesztve

Csatlakozott: 2013.08.09. 22:37
Hozzászólások: 571
Megköszönt másnak: 10 alkalommal
Megköszönték neki: 85 alkalommal
(Szentem .inc lesz a hiba.) Szedd le a amxmodx.crys.hu webről a amxx.b3nc3 átalakítóját ha nem találod küldöm pm. Kiválasztod a sma filet és csatolod ezt a .inc filet!


Csatolmányok:
constants.inc [33.91 KiB]
Letöltve 40 alkalommal.
Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: War3Ft sma átalakítása
HozzászólásElküldve: 2013.09.07. 09:48 
Offline
Félisten

Csatlakozott: 2012.06.19. 15:12
Hozzászólások: 926
Megköszönt másnak: 109 alkalommal
Megköszönték neki: 31 alkalommal
stupid írta:
(Szentem .inc lesz a hiba.) Szedd le a amxmodx.crys.hu webről a amxx.b3nc3 átalakítóját ha nem találod küldöm pm. Kiválasztod a sma filet és csatolod ezt a .inc filet!


Ugyanazt írja

_________________
Kép


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: War3Ft sma átalakítása
HozzászólásElküldve: 2013.09.07. 09:58 
Offline
Felfüggesztve

Csatlakozott: 2013.08.09. 22:37
Hozzászólások: 571
Megköszönt másnak: 10 alkalommal
Megköszönték neki: 85 alkalommal
Ok. Akkor megcsinálom én neked.


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: War3Ft sma átalakítása
HozzászólásElküldve: 2013.09.07. 10:01 
Offline
Jómunkásember

Csatlakozott: 2012.01.29. 12:48
Hozzászólások: 408
Megköszönt másnak: 15 alkalommal
Megköszönték neki: 126 alkalommal
stupid írta:
(Szentem .inc lesz a hiba.) Szedd le a amxmodx.crys.hu webről a amxx.b3nc3 átalakítóját ha nem találod küldöm pm. Kiválasztod a sma filet és csatolod ezt a .inc filet!

Bele kellet volna nézni a forráskódba, mielőtt hülyeséget írsz: http://amxmodx.crys.hu/site/viewsource.php?f=war3ft

Step 1. Töltsd le az alábbi amxmodx telepítőt: http://sourceforge.net/projects/amxmodx ... e/download (várj 5 másodpercet és magától felugrik a letöltés)

Step 2. Telepítsd fel:
[ablak]Telepítés közben az alábbi résznél:
Csatolmány:
step1.jpg
step1.jpg [ 47.95 KiB | Megtekintve 2453 alkalommal ]

ezután kiválasztasz egy helyet a merevlemezen ahova felszeretnéd telepíteni (mind1 hova), s a
következő lépésnél a felugró ablaknál "Igen" -re kattintasz:
Csatolmány:
step2.jpg
step2.jpg [ 21.46 KiB | Megtekintve 2453 alkalommal ]
[/ablak]
Step 3.
Ezt szépen letöltöd:
Csatolmány:
war3ft.zip [123.79 KiB]
Letöltve 77 alkalommal.

Belépsz abba a mappába ahova telepítettél, azon belül "amxmodx/scripting/"és oda szépen bemásolod a war3ft mappát + az SMA fájlt (mindkettőt beleraktam a zip-be). Ezután megkeresed és elindítod a compile.exe -t.

VÉGKIFEJLET:
ha mindent jól csináltál, akkor a compiled mappában megtalálod az amxx fájlt.

Ők köszönték meg HuBaBuBa nek ezt a hozzászólást: Tomos (2013.09.07. 10:16)
  Népszerűség: 2.27%


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: War3Ft sma átalakítása
HozzászólásElküldve: 2013.09.07. 10:16 
Offline
Félisten

Csatlakozott: 2012.06.19. 15:12
Hozzászólások: 926
Megköszönt másnak: 109 alkalommal
Megköszönték neki: 31 alkalommal
HuBaBuBa írta:
stupid írta:
(Szentem .inc lesz a hiba.) Szedd le a amxmodx.crys.hu webről a amxx.b3nc3 átalakítóját ha nem találod küldöm pm. Kiválasztod a sma filet és csatolod ezt a .inc filet!

Bele kellet volna nézni a forráskódba, mielőtt hülyeséget írsz: http://amxmodx.crys.hu/site/viewsource.php?f=war3ft

Step 1. Töltsd le az alábbi amxmodx telepítőt: http://sourceforge.net/projects/amxmodx ... e/download (várj 5 másodpercet és magától felugrik a letöltés)

Step 2. Telepítsd fel:
[ablak]Telepítés közben az alábbi résznél:
Csatolmány:
step1.jpg

ezután kiválasztasz egy helyet a merevlemezen ahova felszeretnéd telepíteni (mind1 hova), s a
következő lépésnél a felugró ablaknál "Igen" -re kattintasz:
Csatolmány:
step2.jpg
[/ablak]
Step 3.
Ezt szépen letöltöd:
Csatolmány:
war3ft.zip

Belépsz abba a mappába ahova telepítettél, azon belül "amxmodx/scripting/"és oda szépen bemásolod a war3ft mappát + az SMA fájlt (mindkettőt beleraktam a zip-be). Ezután megkeresed és elindítod a compile.exe -t.

VÉGKIFEJLET:
ha mindent jól csináltál, akkor a compiled mappában megtalálod az amxx fájlt.


Kösz sikerült.

_________________
Kép


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 27 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