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();
Printable View
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.
haha
what are you talking about?
Well first of allwhy there's a double quote mark ""?Quote:
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.
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);
1) It's a function, don't put the function in a function
2) tank is your spawned tank
3) you need libcod
4) the setalive function does NOT go through the callback playerdamage, it gives off a notify("damage") instead.
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);
}