View Full Version : player model
malyczolg
14th September 2013, 16:18
hello .
i gives for player the TANK model
self setmodel(""xmodel/vehicle_german_armored_car2");
self detachall();
i cant kill this player , how make if i hit in some part of the model player has been killed?
RobsoN
14th September 2013, 16:57
Thanks for stealing my ideas ASLO. Can't you do something yourself? Do you need to steal everything? Even ideas? FFS.
malyczolg
14th September 2013, 17:03
haha
what are you talking about?
YuriJurek
14th September 2013, 20:06
Well first of all
self setmodel(""xmodel/vehicle_german_armored_car2");
self detachall();
why there's a double quote mark ""?
As for the rest you have to spawn an origin on this entity and then allow it to take damage.
Loveboy
14th September 2013, 22:08
Hello, as Yuri said
why there's a double quote mark ""?
whyever you did it, just delete one " , and i would place the self detachall(); before I am set a Model. Probably it will delete the model vehicle_german_armored_car2 too.
kung foo man
14th September 2013, 23:57
setAlive(state)
{
entity = self;
if (state)
closer(7, entity getEntityNumber(), 1);
else
closer(7, entity getEntityNumber(), 0);
}
player setModel("");
tank linkTo(player);
tank setAlive(1);
Now the tank should call CodeCallback_PlayerDamage. Needs libcod: https://github.com/kungfooman/libcod
malyczolg
15th September 2013, 09:18
setAlive(state)
{
entity = self;
if (state)
closer(7, entity getEntityNumber(), 1);
else
closer(7, entity getEntityNumber(), 0);
}
player setModel("");
tank linkTo(player);
tank setAlive(1);
Now the tank should call CodeCallback_PlayerDamage. Needs libcod: https://github.com/kungfooman/libcod
dont work
uninitialised variable 'state'
uninitialised variable 'player'
uninitialised variable 'tank'
kung foo man
15th September 2013, 09:22
1) It's a function, don't put the function in a function
2) tank is your spawned tank
3) you need libcod
IzNoGoD
15th September 2013, 09:26
4) the setalive function does NOT go through the callback playerdamage, it gives off a notify("damage") instead.
kung foo man
15th September 2013, 09:38
Was unsure on that, but it acts like: tank notify("damage", iDamage, eAttacker);
while (1)
{
tank waittill("damage", iDamage, eAttacker);
iprintlnbold("danage: " + iDamage);
}
malyczolg
15th September 2013, 10:11
how use libcod ?
kung foo man
15th September 2013, 10:15
It's written all on the start page of libcod (scroll down): https://github.com/kungfooman/libcod
malyczolg
15th September 2013, 10:27
Call Of Duty 2 1.2
Call Of Duty 2 1.3
Call Of Duty 4 1.7
i make mod for cod2 1.0
RobsoN
15th September 2013, 11:45
This guy won't undestand it, if he don't know what is self scripting. Why you are still helping him?
kung foo man
15th September 2013, 12:22
Public helping isn't actually about helping a specific person, it's about all. Everybody comes up here and then with the same questions. :)
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.