Witamy w Nieoficjalnym polskim support'cie AMX Mod X
Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
|
Guest Message by DevFuse
Wklejka 1hdyesk9nihww dodana przez GT Team, 05.01.2013 23:02
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45.
stock getTurretClosestMonster(ent) { if(!pev_valid(ent)) return PLUGIN_CONTINUE new owner owner = entity_get_int(ent, EV_INT_iuser2) new Float:flClosestDist flClosestDist = float( gTurretsRange[ owner ][ get_sentry_id_by_ent(owner, ent) ] ) new Float:flDistanse flDistanse = 99999.0 new Float:fOrigin[2][3]; if(pev_valid(ent)) pev(ent, pev_origin, fOrigin[0]) //Pobiera origin entu u ktorego ma szukac new tempEntID; //zampisuje najblizszego enta tempEntID = 0 new entlist[10] // maxymalna liczba zapisanych entow new num num = find_sphere_class(ent, "monster", flClosestDist, entlist, 9)// zwraca liczbe wyszukanych obiektow if(num <= 0) return 0; for(new i ; i < num ; i++) { if(!pev_valid(entlist[i])) continue; pev(entlist[i], pev_origin, fOrigin[1]); if(get_distance_f(fOrigin[0], fOrigin[1]) < flDistanse) { flDistanse = get_distance_f(fOrigin[0], fOrigin[1]); tempEntID = entlist[i]; } } return tempEntID; }
Dodanych wklejek: 4031
Powered By (Pav32) Pastebin © 2011