-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SetVehicleSpawnInfo #9
Comments
Hm... Look's like yes. |
Alright, something like this - i need, will appreciate if it's added. |
Hm... Looks like set vehicle to new position after SetVehicleToRespawn used is very easy, just need to hook SetVehicleToRespawn. But spawn at new spawn when server respawn the vehicle because respawntime passed, it's harder. (need to hook complete CVehicle::Respawn which I do now want to do) I have opensamp 0.3x, community should update it to 0.3z and there would be very easy to modify anithing in server :D But i won't do it, i want to live outside of my computer. https://code.google.com/p/open-samp/source/browse/#svn%2Ftrunk%2FOpen%20SAMP |
what about just re-sending the "create vehicle" rpc to override it with new spawn position data? |
You cant override, just create new vehicle |
could you create a new vehicle with SAME old id? |
Yes, this is how i imagined the solution. |
So, is this feasible? if it did that it would be a winner, because it would keep the same vehicle id on which a lot of code relies. |
Don't worry, this will work. I just need to implement it. I'll do it when i'll have free time. |
It will be Awesome! |
I saw c0c6d6c but that seems like a lot of unnecessary work. You could just send the RPC to remove the vehicle then send the vehicle spawn RPC with the same vehicle ID and new position parameters. That, combined with hooking the Pawn native functions for creating vehicles would become a complete solution. |
I want to do that, but I want completly hook CVehicle::Spawn, hook pawn native SetVehicleToRespawn isn't enough.. |
Why not just mess with vehicles pool? Just do everything like in GetVehicleSpawnInfo only set new info. Next time vehicle is bound to respawn it should access that memory and respawn it at new coordinates. Also i have seen there is something implemented already, is it working or? (If it is why not close issue?) |
Maybe this will be in R16 :) For me it works currently, going to test it soon on live server. |
Is this possible to add a function to change existing vehicle's spawn info coordinates and have respawnvehicle spawn the vehicle at new place?
The text was updated successfully, but these errors were encountered: