24.12.2013, 07:27
So,I was trying to make my speedometer hide when a player leaves the vehicle he's driving,but I noticed it doesnt disappear when player dies.I was wondering what could be the problem,and was trying to fix it for days,when I noticed that what causes it is that when player dies and is sent to class selection,he actually remains in the vehicle he died in.I made a simple command to check player's vehicle ID at any moment,and the result was that when I died,and checked my vehicle ID in class selection,it was the same as the vehicle I died in.I guess this is similar to the kick/ban bug that doesnt send the reason message to the kicked/banned player,because player remains in the vehicle even when I add RemovePlayerFromVehicle(playerid); in my /kill,/reclass cmds,and in OnPlayerDeath.Below is a video I made to describe the bug.Also if this bug has already been reported,please forgive me.
[ame]http://www.youtube.com/watch?v=Hngw9eKitmA[/ame]
Here is the command in case someone else wanna test this bug
[ame]http://www.youtube.com/watch?v=Hngw9eKitmA[/ame]
Here is the command in case someone else wanna test this bug
pawn Код:
COMMAND:vid(playerid,params[])
{
new vehicleid,Msg[128];
vehicleid = GetPlayerVehicleID(playerid);
format(Msg,128,"Your vehicle id is %i",vehicleid);
SendClientMessage(playerid,0xffffffff,Msg);
return 1;
}