Jump to content

NPCs: "immortal peds"


Recommended Posts

Posted

Please tell my possible to create invulnerable peds? And how

Будучи студентом архитектурно-строительного университета, специальности Автомобильные дороги и безопасность движения, я просто не могу спокойно смотреть на тот ужас, что вы творите с более-менее удачной поделкой Rockstar'ов в Roleplay-режимах.

Делаю карты. Делаю чертовски хорошие карты. Бесплатно. Заинтересуй меня!

mtaubmapper.png

Posted

Presuming you have a ped defined as "ped", the script below should work (client-side):

function invPed()
cancelEvent()
end
addEventHandler("onClientPedDamage",ped,invPed)

Retired

Posted
Presuming you have a ped defined as "ped", the script below should work (client-side):
function invPed()
cancelEvent()
end
addEventHandler("onClientPedDamage",ped,invPed)

it work?

Будучи студентом архитектурно-строительного университета, специальности Автомобильные дороги и безопасность движения, я просто не могу спокойно смотреть на тот ужас, что вы творите с более-менее удачной поделкой Rockstar'ов в Roleplay-режимах.

Делаю карты. Делаю чертовски хорошие карты. Бесплатно. Заинтересуй меня!

mtaubmapper.png

Posted

Dont work :oops:

If I shoot in one ped, just appears different. all. This happens once. please help to create invincible npc :roll:

Будучи студентом архитектурно-строительного университета, специальности Автомобильные дороги и безопасность движения, я просто не могу спокойно смотреть на тот ужас, что вы творите с более-менее удачной поделкой Rockstar'ов в Roleplay-режимах.

Делаю карты. Делаю чертовски хорошие карты. Бесплатно. Заинтересуй меня!

mtaubmapper.png

Posted
Dont work :oops:

If I shoot in one ped, just appears different. all. This happens once. please help to create invincible npc :roll:

You know you should put that client side, not server side.

Officially MTA's worst fanboy

default.pngdefault.png

default.pngdefault.pngdefault.png

Posted

Forgive my incompetence...

This means that you need to specify a meta "client"? Or should he put his life in a folder "mods"?

Будучи студентом архитектурно-строительного университета, специальности Автомобильные дороги и безопасность движения, я просто не могу спокойно смотреть на тот ужас, что вы творите с более-менее удачной поделкой Rockstar'ов в Roleplay-режимах.

Делаю карты. Делаю чертовски хорошие карты. Бесплатно. Заинтересуй меня!

mtaubmapper.png

Posted
This means that you need to specify a meta "client"? Or should he put his life in a folder "mods"?

I don't really know, what you want to say with this, but you need to put the script snippet into a script file, which itself is added with a 'type="client"'.

So let's say that your file is called client.lua. Then your meta.xml line would look like this:

<script src="client.lua" type="client" />

Here is another help for it:

https://wiki.multitheftauto.com/wiki/Client_side_scripts

lss_ad_banner.png
  • 6 months later...
Posted

please tell me how to make... a ped of the head appeared the inscription with his name

:twisted:

Sorry, my english is bad

Будучи студентом архитектурно-строительного университета, специальности Автомобильные дороги и безопасность движения, я просто не могу спокойно смотреть на тот ужас, что вы творите с более-менее удачной поделкой Rockstar'ов в Roleplay-режимах.

Делаю карты. Делаю чертовски хорошие карты. Бесплатно. Заинтересуй меня!

mtaubmapper.png

Posted

try this code

--the Ped-- 
local noobPed = createPed(278, 0, 0, 0, 0) 
setElementRotation(noobPed, ZRotation) 
  
  
--every 100 miliseconds the ped health will be set to 100-- 
function hp() 
setElementHealth(noobPed, 100) 
end 
setTimer, 100, 0) 

Posted
try this code
--the Ped-- 
local noobPed = createPed(278, 0, 0, 0, 0) 
setElementRotation(noobPed, ZRotation) 
  
  
--every 100 miliseconds the ped health will be set to 100-- 
function hp() 
setElementHealth(noobPed, 100) 
end 
setTimer, 100, 0) 

That uses too much CPU. Actually, Callum said how to do this.

  • 2 months later...
Posted

Phat, isn't this an old topic already?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

If he is trying to give some help addition to the topic, isn't bad to bump it.

Oh, and for to make invincible peds, use my simple script resource, Extra Health. It's at my signature, check:

|

|

|

V

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...