Forum Jump :

Author Message

Posts: 14

Level: Member

Country: se
Age: 44
In-game name:

#1 Posted at 2016-07-14 18:45        
Can someone help me with this???
Im making a mission thats like Destruction derbie and you can shoot players by car missiles(B_40mm_GPR) when you level up.
but how do you make the kill be that player who spawns the missile?
I have looked on forums and I use a regular killing script thats make sense for regulare killing.

while {true} do {
if (!(_x getVariable ["isTreated", false])) then {
_x addMPEventHandler ["MPKilled", {
if ((_this select 1) isEqualTo player) then {
player setVariable ["playerMoney", (player getVariable "playerMoney") + 100];
playerMoney = playerMoney + 100;
player SideChat format ["killing reward $100"];
_x setVariable ["isTreated", true];
} forEach (allUnits - [player]);
sleep 5;
// I call it in initPlayerLocal

Can I do something that's making the missile(B_40mm_GPR) that spawns to my bullit?