OnPlayerExitVehicle(thevhicule, destroys no matter what)
#10

Quote:
Originally Posted by arbit
Посмотреть сообщение
why?? he's doing it correctly!
No, he's not doing it correctly. Do you know how timers are working? Every time when you exit your vehicle this timer will be called. So that means, this timer will be called when player exit vehicle, and player enter vehicle again before ten seconds will be passed, and player exit again. There will be two timers started, first with smaller count and second one with higher count. Server will get confused and will stop first timer (even if player is in the vehicle) and destroy his vehicle. And then second timer will call _DestroyVehicle and server gonna destroy already destroyed vehicle, what may crash player/server.

edit://
Quote:

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
KillTimer(timer[playerid]);
return 1;
}

You should not call KillTimer function in OnPlayerEnterVehicle and also you should not give him a ready code, because we are here to help, not to give ready code. If he want to get a ready code then he should post it in Script request thread.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 11 Guest(s)