GTA San Andreas > Скриптинг
Зомби мод
egor230:
daniel_360, писать скрипт на cleo, ты потратишь много нервов, Лучше пиши на lua. вот аналог твоего скрипта.
--- Код: Javascript ---script_author("egor")require "lib.moonloader"local encoding = require 'encoding'encoding.default = 'CP1251'--func = require 'module' -- подключить модульlocal function codinat()local res = isCharInAnyCar(PLAYER_PED) -- 00DF: actor $PLAYER_ACTOR driving if res then local car = storeCarCharIsIn(PLAYER_PED)local x, y, z = getCarCoordinates(car) -- 00AA: store_car 0@ position_to 3@ 4@ 5@ else local x, y, z = getCharCoordinates(PLAYER_PED) -- получить координаты cjreturn x,y,z endendlocal function zomb(ped)taskKillCharOnFoot(ped, PLAYER_PED) -- 05E2: AS_actor 65@ kill_actor 50@shutCharUpForScriptedSpeech(ped, 1) -- 0A09: set_actor 0@ muted 1--setCharDecisionMaker(ped, 32) -- 060B: set_actor 0@ decision_maker_to 32--setAnimGroupForChar(ped, "OLDMAN")--0245: set_actor 0@ walk_style_to "OLDMAN"-- giveWeaponToChar(ped, 0,0) -- 01B2: give_actor 0@ weapon 0 ammo 0-- removeAllCharWeapons(ped) -- 048F: actor 0@ remove_weaponsend function main()while true dowait(0) res = testCheat("mn")--0ADC: test_cheat "BLOWUP"if resthen printStringNow("star", 1000)-- вывод текстаwhile isPlayerPlaying(PLAYER_HANDLE) or res1 do wait(100)-- отключить если игрок умер или чит nox,y,z = codinat()res1 = testCheat("no")--выключить зомбиif res1then printStringNow("end", 1000)breakelse res, ped = findAllRandomCharsInSphere(x,y,z, 40.3, 0, 1) -- 0AE1: $actor = random_actor_near_point 0@ 1@ 2@ in_radius 10.0 find_next 1 pass_deads 1zomb(ped)end endbreakend endend
Навигация
Перейти к полной версии