hello .
i gives for player the TANK model
i cant kill this player , how make if i hit in some part of the model player has been killed?PHP Code:
self setmodel(""xmodel/vehicle_german_armored_car2");
self detachall();
hello .
i gives for player the TANK model
i cant kill this player , how make if i hit in some part of the model player has been killed?PHP Code:
self setmodel(""xmodel/vehicle_german_armored_car2");
self detachall();
Thanks for stealing my ideas ASLO. Can't you do something yourself? Do you need to steal everything? Even ideas? FFS.
"Don't worry if your code doesn't work correctly - if everything worked, you would not work" ~Mosher's right
haha
what are you talking about?
Well first of allwhy there's a double quote mark ""?self setmodel(""xmodel/vehicle_german_armored_car2");
self detachall();
As for the rest you have to spawn an origin on this entity and then allow it to take damage.
Last edited by YuriJurek; 14th September 2013 at 20:08.
Loveboy (14th September 2013)
Now the tank should call CodeCallback_PlayerDamage. Needs libcod: https://github.com/kungfooman/libcodPHP Code:
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);
timescale 0.01
1) It's a function, don't put the function in a function
2) tank is your spawned tank
3) you need libcod
timescale 0.01
4) the setalive function does NOT go through the callback playerdamage, it gives off a notify("damage") instead.
kung foo man (15th September 2013)
Was unsure on that, but it acts like: tank notify("damage", iDamage, eAttacker);
PHP Code:
while (1)
{
tank waittill("damage", iDamage, eAttacker);
iprintlnbold("danage: " + iDamage);
}
timescale 0.01