Jump to content

HerrVorragend

Member
  • Content Count

    16
  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

About HerrVorragend

  • Rank
    Private First Class
  1. HerrVorragend

    AddEventHandler wrong side of Killer!?!?

    Wow! i didn't know that!! That solved the probems. What a weird thing.... I search for like hours on the internet. But this forum and his people are the best :-) Thx!
  2. Hi Guys, im trying to give every player money 4 killing a player from another side. Im also trying to remove money from the teamkiller. I added an EventHandler on each player (within the initPlayerLocal.sqf). player addMPEventHandler ["Killed", _this execVM 'playerKilled.sqf';"]; Within the executet script i check if the killer is on the same sideof the victim. _victim = _this select 0; _killer = _this select 1; [format ["%1 killed by %2\n%3 killed by %4",_victim,_killer, (side _victim),(side _killer) ], "systemChat", true] call BIS_fnc_MP; switch (true) do { case ( (_victim) == (_killer) ): {}; // Selfkill via respawn or grenade etc. case ( (side _victim) == (side _killer) ): { // Teamkill _teamKillerVictimMoney = _victim getVariable "Money"; _teamKillerMoney = _killer getVariable "Money"; if( (_teamKillerMoney > 0) && (_teamKillerMoney < SERVER_playerTeamKillMoney) ) then { SERVER_playerTeamKillMoney = _teamKillerMoney; }; _teamKillerMoney = _teamKillerMoney - SERVER_playerTeamKillMoney; _teamKillerVictimMoney = _teamKillerVictimMoney + SERVER_playerTeamKillMoney; _victim setVariable ["Money", _teamKillerVictimMoney, true]; _killer setVariable ["Money", _teamKillerMoney, true]; _killer addRating (0 - (rating _killer)); [format ["Do not kill Teammates!!\n%1 $ have been given to your victim!", SERVER_playerTeamKillMoney], "hint", true] call BIS_fnc_MP; [format ["You received %1 $ from the Teamkiller!", SERVER_playerTeamKillMoney], "hint", true] call BIS_fnc_MP; }; default { // Normal kill _money = _killer getVariable "Money"; _money = _money + SERVER_playerKillMoney; _killer setVariable ["Money", _money, true]; }; }; This doesnt work because the killer is always on CIV side.... But why i dont get it. I use side player very often and it always worked. But not within the eventhandler. Can u tell me why?
  3. HerrVorragend

    GUI add Buttons and Text to ListBox

    yes i know. But SA-Matra build a GUI with a Scroll-List containing (different!) Buttons, Text, Pictures Like this: http://cloud-2.steampowered.com/ugc/25093013939107042/C8AF8BC2F0CFD0E892762655B88D03B259B15E91/ (477 kB) It is also possible to hide entrys!
  4. Aha... didn't knew that! Let me give it a shot. Thx!
  5. HerrVorragend

    GUI add Buttons and Text to ListBox

    i know the documentation, but i don't know which command i have to use. i'm allready using sbSetPicture. But i can't add a button...
  6. No, 'cause you can select the side in mission browser.
  7. It is possible. Do you know the Wasteland-Mission from SA-Matra. Spawned AI is allways hostile to every side. EDIT: Maybe you can set a group hostile to a side?
  8. Hello! I want to create enemy groups which attack all sides (opfor, blufor, and independent) but not eachother! I'm creating units like this, but i can only create them 4 blufor, obfor, etc... Code: _group = createGroup indipendent; _unit = _group createUnit ["I_officer_F", _pos, [], 3, "NONE"]; How can i set the units as enemys for all sides without shooting eachother? Thanks!
  9. HerrVorragend

    GUI add Buttons and Text to ListBox

    The documentation is very poor (compare to Java-Doc). I saw the menu in King of the Hill by SA-Matra. The buy menu is scrollable and has pictures, text, buttons, etc... Maybe its not a ListBox?
  10. Hello everyone, i want to add Buttons and Text to an existing ListBox. Is it possible? And when, how? Thanks!!
  11. Yes. Why? Whats the point? But then, i have to check for the nearest player, set to doFire... Sounds like a dirty workaround.
  12. Hi thanks for the reply, but i cant use it, because west AI will attack civilian buildings... thats not very nice :-) I would like to have spawnable AI's like the ones in SA-Matras-Wasteland.
  13. I tried that before, but the Units will attack eachother... isn't the line _Soldier joinAsSilent [(group player),2] useless? Because you created that unit with the group: _Soldier = (group player) createUnit ["B_Soldier_F", player modelToWorld [0,4,0],[],0,"FORM"];
×