Can't Remove Building From Includes
#9

Quote:
Originally Posted by RogueDrifter
Посмотреть сообщение
No lol you can't do that, it HAS to be under OnPlayerConnect, Also the reconnect crash is mentioned in the samp wiki when you remove a building twice for a player he crashes.
It doesn't HAVE to be under OnPlayerConnect, while it may be best practice, it is perfectly fine to place it anywhere providing that you can provide a valid playerid, the problem being though that it is difficult to determine whether or not the specific playerid has already had the objects removed.

The only work-around that I can find is mentioned in the thread I linked above:
Quote:
Originally Posted by Spmn
Посмотреть сообщение
I used a similar approach on a stunt server and it worked flawless:
1) teleport the player on this object, right above the sea level
2) wait 1-2 seconds (IIRC, I made use of player's ping and/or fps for more accurate results)
3) use GetPlayerAnimationIndex() to detect if player was swimming or not
-> if player isn't swimming -> call remove building code, INCLUDING that object
-> else -> skip

I also had a library based on this, but I can't find it right now.
Reply


Messages In This Thread
Can't Remove Building From Includes - by Speaker - 31.12.2017, 13:33
Re: Can't Remove Building From Includes - by MEW273 - 31.12.2017, 13:57
Re: Can't Remove Building From Includes - by Ritzy2K - 31.12.2017, 14:01
Re: Can't Remove Building From Includes - by MEW273 - 31.12.2017, 14:06
Re: Can't Remove Building From Includes - by Speaker - 31.12.2017, 14:06
Re: Can't Remove Building From Includes - by Speaker - 31.12.2017, 14:08
Re: Can't Remove Building From Includes - by MEW273 - 31.12.2017, 14:17
Re: Can't Remove Building From Includes - by RogueDrifter - 31.12.2017, 14:17
Re: Can't Remove Building From Includes - by MEW273 - 31.12.2017, 14:22
Re: Can't Remove Building From Includes - by RogueDrifter - 31.12.2017, 14:53

Forum Jump:


Users browsing this thread: 1 Guest(s)