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);
}
how use libcod ?
It's written all on the start page of libcod (scroll down): https://github.com/kungfooman/libcod
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
This guy won't undestand it, if he don't know what is self scripting. Why you are still helping him?
Public helping isn't actually about helping a specific person, it's about all. Everybody comes up here and then with the same questions. :)