Casio91Fin 31 Posted January 31, 2021 How to add the prize if a player kills 10 AIs and the player gets one respawn ticket. I already have this kind of floor plan initServer.sqf: addMissionEventHandler ["EntityKilled", { params ["_killed", "_killer", "_instigator"]; if ((_killed isKindOf "Man") and (!isPlayer _killed)) then { [_killer, 100] call HALs_money_fnc_addFunds; removeAllWeapons _killed; removeAllItems _killed; removeAllAssignedItems _killed; deleteVehicle (nearestObject [_killed, "WeaponHolderSimulated"]); }; }]; Share this post Link to post Share on other sites
gc8 970 Posted February 1, 2021 _killer setVariable ["numKilled", (_killer getVariable ["numKilled",0]) + 1 ]; if( (_killer getVariable ["numKilled",0]) >= 10 ) then { // Reward code here _killer setVariable ["numKilled", 0]; // Reset }; code not tested 2 Share this post Link to post Share on other sites
Casio91Fin 31 Posted February 1, 2021 @gc8 Thank you. It works really well. initServer.sqf: addMissionEventHandler ["EntityKilled", { params ["_killed", "_killer", "_instigator"]; _killer setVariable ["numKilled", (_killer getVariable ["numKilled",0]) + 1 ]; if( (_killer getVariable ["numKilled",0]) >= 10 ) then { [_killer, 200] call HALs_money_fnc_addFunds; [_killer, +1] call BIS_fnc_respawnTickets; _killer setVariable ["numKilled", 0]; // Reset }; if ((_killed isKindOf "Man") and (!isPlayer _killed)) then { [_killer, 50] call HALs_money_fnc_addFunds; removeAllWeapons _killed; removeAllItems _killed; removeAllAssignedItems _killed; deleteVehicle (nearestObject [_killed, "WeaponHolderSimulated"]); }; }]; Share this post Link to post Share on other sites