Posts: 65
Threads: 12
Joined: Jul 2008
Reputation:
0
You can use "playerid" in public OnVehicleDeath ??
Example:
public OnVehicleDeath (vehicleid, killerid)
(
DestroyVehicle (vehicleid);
SendClientMessage (playerid, COLOR_RED, "His car was destroyed");//I can use it??
)
return 1;
)
If you can not please anyone knows of any way to use "playerid"?
Tanks
Posts: 1,154
Threads: 6
Joined: Aug 2008
Reputation:
0
killerid = the playerid that killed the vehicle
Posts: 1,154
Threads: 6
Joined: Aug 2008
Reputation:
0
killerid is the id of the driver AFAIK
Posts: 1,042
Threads: 32
Joined: Apr 2008
Reputation:
0
I don't think so, I think if its blown up by a rocket, eh, I'll test it.
Posts: 1,042
Threads: 32
Joined: Apr 2008
Reputation:
0
killerid always returns 255 (INVALID_PLAYER_ID)
backwardsman, mine works just as well.
Posts: 65
Threads: 12
Joined: Jul 2008
Reputation:
0
Ok e use this funcion
new LastDriver[MAX_VEHICLES];
if(newstate == PLAYER_STATE_DRIVER)
{
LastDriver[GetPlayerVehicleID(playerid)] = playerid;
return 1;
}
//OnVehicleDeath
DestroyVehicle (vehicleid);
SendClientMessage (LastDriver[vehicleid], COLOR_RED, "His car was destroyed");
But now I'm having trouble adding an array in public ...
See how I did it add, but did not work:
/ / OnVehicleDeath
DestroyVehicle (vehicleid);
SendClientMessage (LastDrive [vehicleid], COLOR_RED "His car was destroyed");
Insurance LastDrive [vehicleid] == 0;
Posts: 65
Threads: 12
Joined: Jul 2008
Reputation:
0
error 001: expected token: ";", but found "-identifier-"