Jump to content

How to destory or disable player plane in a multiplayer server?


omskTransmash

Recommended Posts

For example in Hoggit Syran 3.0 server, if player loads more weapons than he is allowed, soon the player cannot control the aircraft and it crashes.

How can I do that in my server? it says Object.Destroy() doesn't work on player client slot, and slmod only has "Kick" command, (I never used slmod before though)

I have some experience in programming so just point me to the right direction and I can do it from there. Any help would be appreciated. Thank you!

Link to comment
Share on other sites

It rather depends on what you are trying to achieve. If you want to outright destroy a client plane, that can only be achieved on the server side, using a script in /Hooks - you would kick the player, which you usually signal with a flag (since server and mission can only communicate with flags - rather oldschool, but secure)

If you simply want to punish the player for trying to cheat, and remove their plane by sheer physics, you already described a work-around that apparently (I did not look at the code, this is me just guessing) the mission you referenced uses: it overloads the plane most likely by invoking (the fiendishly difficult to find, since it's not in the unit tree) trigger.action.setUnitInternalCargo() with a deadly weight. That way the plane crashes or can't even depart, and you don't have to tell the server to do the dirty work (plus, it also works in single player)

 

Link to comment
Share on other sites

1 hour ago, cfrag said:

That's a great idea - but doesn't that risk damaging nearby units as well?

 

As long as the power is 1 I don’t think that should be any worry, that is unless someone is obviously right next to them which there might be some… splash damage lol


Edited by Wizxrd
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...