Show message to everybody in my car - 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)
+--- Thread: Show message to everybody in my car (
/showthread.php?tid=332610)
Show message to everybody in my car -
aNdReSk - 08.04.2012
How can I get all people in my car to get a message (including myself).
Command /derp
send "derp" to all players in my car as well as myself
Re: Show message to everybody in my car -
Libra_PL - 08.04.2012
pawn Код:
new PlayerCar = GetPlayerVehicleID(playerid);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(GetPlayerVehicleID(i) == PlayerCar && IsPlayerInAnyVehicle(i))
{
SendClientMessage...
}
}
Respuesta: Show message to everybody in my car -
aNdReSk - 08.04.2012
Thanks libra, testing it

+rep
should I check if player is connected or that's not necessary anymore?
Re: Show message to everybody in my car -
Libra_PL - 08.04.2012
In this script it isn't really needed, because player is not connected isn't in a vehicle or haven't got their vehicle ID where he is.