IsPlayerCrashing function - possible? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: IsPlayerCrashing function - possible? (
/showthread.php?tid=302609)
IsPlayerCrashing function - possible? -
Danny - 09.12.2011
Hello,
Is it possible to create some kind of IsPlayerCrashing function?
I guess it is if you find a way to check if the player's client is still responding to given signals.
Possible? Discuss it here!
Greetz,
Danny
Re: IsPlayerCrashing function - possible? -
PlayHard - 09.12.2011
Hm, maybe. But why don't you use crash detect plugin?
Re: IsPlayerCrashing function - possible? -
Ash. - 09.12.2011
Couldn't you send an action, then check if it's done?
pawn Код:
PutPlayerInVehicle(...);
if(IsPlayerInVehicle(...)) //Action completed, they're still with us!
else //The action didn't complete, we lost them! :(
Re: IsPlayerCrashing function - possible? -
MP2 - 09.12.2011
But wouldn't that also happen if a player is paused?
Re: IsPlayerCrashing function - possible? -
Danny - 09.12.2011
Quote:
Originally Posted by PlayHard
Hm, maybe. But why don't you use crash detect plugin?
|
I think you're mixing a few things up now. The crashdetect plugin is used to detect a scriptcrash and not a player-crash.
Quote:
Originally Posted by funky1234
Couldn't you send an action, then check if it's done?
pawn Код:
PutPlayerInVehicle(...); if(IsPlayerInVehicle(...)) //Action completed, they're still with us! else //The action didn't complete, we lost them! :(
|
That's a good suggestion, but i question if it will return false. Ofcourse the client isn't connected anymore, but the server is still up and sends some data that tells Player X is in a vehicle.
I'm wondering if it's possible to send some sort of ping package and check if it's coming back.