Getting playerid in onvehicledeath - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Getting playerid in onvehicledeath (
/showthread.php?tid=121869)
Getting playerid in onvehicledeath -
Perker12345 - 18.01.2010
Hi, i have this carowner ship thing, and i want it to send a message to the owner of the car everytime his car gets destroyed, could anybody tell me how to message him?
Right now it messages the killer of the car.
pawn Код:
new carownerrr;
carownerrr = PlayerInfo[vehicleid][pCarKey]; // I guess here is the problem, as i added "vehicleid" it should really say "playerid"
SendClientMessage (DynamicCars[carownerrr][cOwner], COLOR_RED, "Your car got destroyed.");
Re: Getting playerid in onvehicledeath -
Tony1337 - 18.01.2010
pawn Код:
new carownerrr[MAX_PLAYERS];
carownerrr[getplayerid] = PlayerInfo[vehicleid][pCarKey]; // I guess here is the problem, as i added "vehicleid" it should really say "playerid"
SendClientMessage (DynamicCars[carownerrr][getplayerid][cOwner], COLOR_RED, "Your car got destroyed.");
im not sure thoґ if it helps, but you can give it a try
Re: Getting playerid in onvehicledeath -
Perker12345 - 19.01.2010
Damn, it didn't help

But thank you Tony