Advertisement
Guest User

HLP scroll dolje DAMAGE SISTEM

a guest
Mar 25th, 2018
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.88 KB | None | 0 0
  1. // Evo nesto nabrzaka od mene. Nadam se da radi, i da si mislio na ovo, uglavnom kad pogodis igraca cuje se ono `ding`, i izbaci ti kolko si mu
  2. // helta skinuo testiraj ako ima errora javi.
  3.  
  4. new Text:GiveDamage[MAX_PLAYERS];
  5. new Text:TakeDamage[MAX_PLAYERS];
  6.  
  7. public OnGameModeInit()
  8. {
  9. for(new i; i < MAX_PLAYERS; ++i)
  10. {
  11. GiveDamage[i] = TextDrawCreate(171.000000, 388.000000, " ");
  12. TextDrawAlignment(GiveDamage[i], 2);
  13. TextDrawBackgroundColor(GiveDamage[i], 255);
  14. TextDrawFont(GiveDamage[i], 2);
  15. TextDrawLetterSize(GiveDamage[i], 0.160000, 0.599999);
  16. TextDrawColor(GiveDamage[i], 0x00FF04FF);
  17. TextDrawSetOutline(GiveDamage[i], 1);
  18. TextDrawSetProportional(GiveDamage[i], 1);
  19. }
  20.  
  21. for(new i; i < MAX_PLAYERS; ++i)
  22. {
  23. TakeDamage[i] = TextDrawCreate(440.000000,388.000000, " ");
  24. TextDrawAlignment(TakeDamage[i], 2);
  25. TextDrawBackgroundColor(TakeDamage[i], 255);
  26. TextDrawFont(TakeDamage[i], 2);
  27. TextDrawLetterSize(TakeDamage[i], 0.160000, 0.599999);
  28. TextDrawColor(TakeDamage[i], 0xE81010FF);
  29. TextDrawSetOutline(TakeDamage[i], 1);
  30. TextDrawSetProportional(TakeDamage[i], 1);
  31. }
  32. return 1;
  33. }
  34.  
  35. forward OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid);
  36. public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
  37. {
  38. new s[20];
  39. format(s, 20, "+Damage %.0f", amount);
  40. TextDrawSetString(GiveDamage[playerid], s);
  41. TextDrawShowForPlayer(playerid, GiveDamage[playerid]);
  42. PlayerPlaySound(playerid,17802,0.0,0.0,0.0);
  43. SetTimerEx("UnistiTextDraw", 1000, false, "i", playerid);
  44. return 1;
  45. }
  46.  
  47. forward OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid);
  48. public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
  49. {
  50. new s[20];
  51. format(s, 20, "-Damage %.0f", amount);
  52. TextDrawSetString(TakeDamage[playerid], s);
  53. TextDrawShowForPlayer(playerid, TakeDamage[playerid]);
  54. SetTimerEx("UnistiTextDraw", 1000, false, "i", playerid);
  55. return 1;
  56. }
  57.  
  58. forward UnistiTextDraw(playerid);
  59. public UnistiTextDraw(playerid)
  60. {
  61. TextDrawHideForPlayer(playerid, GiveDamage[playerid]);
  62. TextDrawHideForPlayer(playerid, TakeDamage[playerid]);
  63. return 1;
  64. }
  65.  
  66. GDJE DA OVO SADA UBACIM ? JA IMAM OVO
  67.  
  68. /////////////////////////////////////////////////////////////////////////////////////////////////////////////
  69. ONO GORE JE TO STO TREBAM UBACIT A OVO DOLJE JE STO IMAM GDJE SADA OVO GORE TREBAM UBACIT ? hvala..
  70. //////////////////////////////////////////////////////////////////////////////////////////////////////////////
  71.  
  72. public OnGameModeInit( )
  73. {
  74.  
  75. SetGameModeText( VERZIJA_MODA );
  76. SendRconCommand( "language "MAP_NAME"" );
  77. //___________________[ TIMERI ]________________
  78. SetTimer("PolaMinuteTimer",30000,true);
  79.  
  80. #if ZIMSKI_MOD == 1
  81. //AddSnowObjects();
  82.  
  83. /*CreateObject(8172,-716.59997559,3800.50000000,8.50000000,0.00000000,0.00000000,90.00000000); //object(vgssairportland07) (1)
  84. CreateObject(3074,-782.29998779,3785.30004883,8.50000000,0.00000000,270.00000000,269.99948120); //object(d9_runway) (6)
  85. CreateObject(3074,-782.29998779,3798.89990234,8.50000000,0.00000000,270.00000000,269.99450684); //object(d9_runway) (7)
  86. CreateObject(3074,-782.29998779,3807.60009766,8.50000000,0.00000000,270.00000000,269.99450684); //object(d9_runway) (8)
  87. CreateObject(3074,-752.09997559,3807.60009766,8.50000000,0.00000000,270.00000000,269.99450684); //object(d9_runway) (9)
  88. CreateObject(3074,-722.00000000,3807.50000000,8.50000000,0.00000000,270.00000000,269.99450684); //object(d9_runway) (10)
  89. CreateObject(3074,-691.79998779,3807.50000000,8.50000000,0.00000000,270.00000000,269.99450684); //object(d9_runway) (11)
  90. CreateObject(3074,-661.59997559,3807.50000000,8.50000000,0.00000000,270.00000000,269.99450684); //object(d9_runway) (12)
  91. CreateObject(3074,-753.79998779,3795.19995117,8.60000038,0.00000000,270.00000000,269.99450684); //object(d9_runway) (14)
  92. CreateObject(3074,-723.59997559,3795.10009766,8.60000038,0.00000000,270.00000000,269.99450684); //object(d9_runway) (15)
  93. CreateObject(3074,-693.40002441,3794.89990234,8.60000038,0.00000000,270.00000000,269.99450684); //object(d9_runway) (16)
  94. CreateObject(3074,-664.09997559,3794.69995117,8.60000038,0.00000000,270.00000000,269.99450684); //object(d9_runway) (17)
  95. CreateObject(3074,-664.29998779,3781.69995117,8.69999981,0.00000000,270.00000000,269.99450684); //object(d9_runway) (18)
  96. CreateObject(3074,-694.50000000,3781.80004883,8.69999981,0.00000000,270.00000000,269.99450684); //object(d9_runway) (19)
  97. CreateObject(3074,-724.40002441,3781.89990234,8.69999981,0.00000000,270.00000000,269.99450684); //object(d9_runway) (20)
  98. CreateObject(3074,-754.40002441,3782.00000000,8.69999981,0.00000000,270.00000000,269.99450684); //object(d9_runway) (21)
  99. CreateObject(8172,-796.79998779,3800.50000000,-48.00000000,90.00000000,0.00000000,90.00000000); //object(vgssairportland07) (2)
  100. CreateObject(8172,-650.20001221,3800.50000000,-48.00000000,90.00000000,180.00000000,90.00000000); //object(vgssairportland07) (3)
  101. CreateObject(8172,-729.09997559,3780.69995117,12.80000019,0.00000000,270.00000000,270.00000000); //object(vgssairportland07) (4)
  102. CreateObject(8172,-726.20001221,3820.19995117,12.80000019,0.00000000,270.00000000,90.00000000);*/
  103. #endif
  104.  
  105. EnableStuntBonusForAll( 0 );
  106. DisableInteriorEnterExits( );
  107. ManualVehicleEngineAndLights( );
  108. UsePlayerPedAnims( );
  109. AllowInteriorWeapons( 1 );
  110. ShowPlayerMarkers( 0 );
  111. //KreirajObjekte( );
  112. ServerInfo[ HangarPaket ] = true;
  113.  
  114. #if ZIMSKI_MOD == 1
  115. SetWeather( 38 );
  116. GlobalnoVrijeme = 38;
  117. ServerInfo[ Prognozasys ] = 38;
  118. #else
  119. ServerInfo[ Prognozasys ] = 10;
  120. SetWeather( 10 );
  121. GlobalnoVrijeme = 10;
  122. #endif
  123.  
  124. MapAndreas_Init( MAP_ANDREAS_MODE_FULL );
  125.  
  126. LoadScriptfiles( );
  127. LoadVehicles( );
  128. CreateMapIcons( );
  129. CreateTextDraws( );
  130. DefineGatesAndDoors( );
  131. CreatePickupsAnd3Ds( );
  132. ResetAllFarmPlants( );
  133. PostaviParoveKladionica( );
  134.  
  135. //Streamer_VisibleItems(STREAMER_TYPE_OBJECT,1000);
  136.  
  137. new year, month, day;
  138. getdate( year, month, day );
  139.  
  140. gettimeEx(ghour, gminute, gsecond);
  141. FixHour(ghour);
  142. ghour = shifthour;
  143. if( !realtime )
  144. {
  145. SetWorldTime(wtime);
  146. GlobalniSat = wtime;
  147. ServerInfo[ VremeInGame ] = wtime;
  148. }
  149.  
  150. AntiDeAMX();
  151.  
  152. // za fly hack, minx, miny, maxx, maxy
  153. farmerField = CreateDynamicRectangle( -1198.3669, -1065.8173, -1002.0459, -909.7990 );
  154. bankSafe = CreateDynamicRectangle( 1473.7382, -1031.7211, 1465.0930, -1007.0601 );
  155. ZlataraSef = CreateDynamicRectangle( 918.9664, -1011.9576, 913.6884, -1010.5016 );
  156. SpawnZona = CreateDynamicRectangle( 356.0672,-2013.1305, 422.5678,-2096.5896 );//edited leon
  157. FarmerPosao = CreateDynamicRectangle( -1224.0177, -1220.6852, -1027.5038, -1064.8070 );
  158. GradjPosao = CreateDynamicRectangle(1859.0541,-1452.8436, 1979.4402,-1345.2263);//edited leon
  159. SSB = CreateDynamicRectangle( 1951.0851, -1744.1436, 1966.6748, -1723.7572 );
  160. KosacMost = CreateDynamicRectangle( 1956.7731, -1262.3374, 1985.3881, -1138.9209 );//edited leon
  161. AdminBaza = CreateDynamicRectangle( 2436.5176,1604.1638, 2598.3367,1482.1650 );//edited leon
  162. ZgradaNeka = CreateDynamicRectangle( 1521.3862, -1378.1085, 1564.0503, -1333.2006 );
  163. GSFMost = CreateDynamicRectangle( 2412.8169, -1722.5156, 2447.5449, -1575.6823 );//edited leon
  164. AutoPijacaBG = CreateDynamicRectangle( 1588.1996,-1151.6184, 1828.9156,-1025.6559 );//edited leon
  165. VineWoodArea = CreateDynamicRectangle( 1413.37354, -830.92944, 1466.22461, -795.86652 );//edited leon
  166. SAJBaza = CreateDynamicRectangle( 1246.2416,-1229.9323,1331.2672,-1176.3035 );//edited leon
  167.  
  168.  
  169. new KurvaP1 = CreateActor( 63, -2411.0474, 994.7935, -20.4423, 6.7633 );
  170. new KurvaP2 = CreateActor( 64, -2412.1418, 993.2431, -20.4423, 123.0319 );
  171. new KurvaP3 = CreateActor( 152, -2391.5752, 993.4570, -20.4423, 116.0734 );
  172. new KurvaP4 = CreateActor( 207, -2393.1602, 1023.3606, -20.3654, 123.7557 );
  173. new KurvaP5 = CreateActor( 238, -2401.6619, 1022.3336, -20.3654, 90.2079 );
  174. ApplyActorAnimation( KurvaP1, "STRIP", "strip_A", 4.0, 1, 1, 1, 1, 0 );
  175. ApplyActorAnimation( KurvaP2, "STRIP", "strip_B", 4.0, 1, 1, 1, 1, 0 );
  176. ApplyActorAnimation( KurvaP3, "STRIP", "strip_C", 4.0, 1, 1, 1, 1, 0 );
  177. ApplyActorAnimation( KurvaP4, "STRIP", "strip_D", 4.0, 1, 1, 1, 1, 0 );
  178. ApplyActorAnimation( KurvaP5, "STRIP", "strip_E", 4.0, 1, 1, 1, 1, 0 );
  179.  
  180.  
  181. //AddStaticVehicle_V(408, 2174.2351, -2265.6245, 14.1000, 225.0000, -1, -1);
  182.  
  183. /*CreateObject_V(1331, 2374.13110, -1533.58521, 23.93410, 0.00000, 0.00000, 180.00000);*/
  184.  
  185. //-------[Interijeri]--------
  186. //KreirajInterijer( "ZatvorUlaz", -2320.4893, 1878.6583, 8.1210, 252.7024, 1651.1866, -99.2422, 1, 0, 1, 0);
  187.  
  188.  
  189. // 2233.8032, 1712.2303, 1011.7632
  190. // casino int
  191. CreateDynamicObject(14777,211.85473633,404.94235229,1021.71655273,0.00000000,0.00000000,0.00000000); //object(int_5weecasino) (1)
  192. //
  193.  
  194.  
  195. for( new askid = 1; askid < MAX_ASKQS; askid++ ) {
  196. askqList[ askid ][ askqSend ] = false;
  197. askqList[ askid ][ askqID ] = -1;
  198.  
  199. strmid( askqList[ askid ][ askqOwner ], "None", 0, strlen( "None" ), 32 );
  200. strmid( askqList[ askid ][ askqQuestion ], "None", 0, strlen( "None" ), 128 );
  201. }
  202.  
  203. if( realtime ) {
  204. new tmphour,
  205. tmpminute,
  206. tmpsecond,
  207. stringicc[ 20 ],stringicc1[ 30 ];
  208.  
  209. gettimeEx( tmphour, tmpminute, tmpsecond );
  210. FixHour( tmphour );
  211. tmphour = shifthour;
  212. SetWorldTime( tmphour );
  213. GlobalniSat = tmphour;
  214. ServerInfo[ VremeInGame ] = tmphour;
  215.  
  216. format( stringicc, sizeof( stringicc ), "~w~%s%d~b~:~w~%s%d", (tmphour < 10) ? ("0") : (""), tmphour, (tmpminute < 10) ? ("0") : (""), tmpminute);
  217. TextDrawSetString( Donji_TD[13], stringicc );
  218. format( stringicc1, sizeof( stringicc1 ), "~w~%d~r~/~w~%d~r~/~w~%d", day, month, year );
  219. TextDrawSetString( Donji_TD[12], stringicc1 );
  220. }
  221. return true;
  222. }
  223.  
  224. public OnGameModeExit( ) {
  225.  
  226.  
  227. gdje sada ono gore trebam ubaciti i koji dio ?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement