Show message to everybody in my car
#1

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
Reply
#2

pawn Код:
new PlayerCar = GetPlayerVehicleID(playerid);

for(new i = 0; i < MAX_PLAYERS; i++)
{
if(GetPlayerVehicleID(i) == PlayerCar && IsPlayerInAnyVehicle(i))
{
SendClientMessage...
}
}
Reply
#3

Thanks libra, testing it +rep

should I check if player is connected or that's not necessary anymore?
Reply
#4

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)