OnVehicleDeath doesn't get called(?)
#1

So i've been struggling to know what reason behind this.. it just doesn't get called whenever a vehicle is destroyed!

pawn Код:
public OnVehicleDeath(vehicleid, killerid)
{
    SendClientMessageToAll(0xFFFFFFFF, "Vehicle destroyed.");
    return 1;
}
Reply
#2

pawn Код:
new string[40];
format(string, sizeof(string), "Vehicle %i was destroyed.", vehicleid);
SendClientMessageToAll(0xFFFFFFFF, string);
Reply
#3

Why do you think that'll make a difference, I merely wrote 1 line of code to send a message to everyone and it still doesn't work. I've even tested it on a blank gamemode and OnVehicleDeath as well as OnVehicleSpawn are not called.
Reply
#4

Quote:
Originally Posted by PaulDinam
Посмотреть сообщение
Why do you think that'll make a difference, I merely wrote 1 line of code to send a message to everyone and it still doesn't work. I've even tested it on a blank gamemode and OnVehicleDeath as well as OnVehicleSpawn are not called.
This function normally works, you might be having some glitches in the code. I've given the above code because if one way doesn't work then you gotta go for another one.
Reply
#5

Quote:
Originally Posted by Ironboy
Посмотреть сообщение
This function normally works, you might be having some glitches in the code. I've given the above code because if one way doesn't work then you gotta go for another one.
A blank gamemode shouldn't have any glitches in it..
Reply
#6

Quote:
Originally Posted by PaulDinam
Посмотреть сообщение
A blank gamemode shouldn't have any glitches in it..
Its weird that it doesn't work for you, i've even tested it and works perfectly.
Reply
#7

Quote:
Originally Posted by Ironboy
Посмотреть сообщение
Its weird that it doesn't work for you, i've even tested it and works perfectly.
Okay I just found out that the callback won't get called if the vehicle gets flipped by itself so the callback itself works perfectly fine. That was my issue.. and no longer an issue.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)