Car Chat <-- Quick Question!
#1

Just a quick question, how would I check to see whos in the car with the player to use a car chat? Like if you want to display a message to only people who are in the car with you or you change the radio station how could I check which players are in the car too? THanks!!!!
Reply
#2

Click on link
IsPlayerInAnyVehicle
Reply
#3

okay cam up with this, Is this the best way?

Код:
			
new vehicleid = GetPlayerVehicleID(playerid);
new passengervehid;
if(listitem == 0) // Rap
{
	PlayAudioStreamForPlayer(playerid,"http://yp.shoutcast.com/sbin/tunein-station.pls?id=8318"); // driver
	  for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
	    		if (!IsPlayerInAnyVehicle(i)) return 1;
                        passengervehid = GetPlayerVehicleID(i);
                        if(passengervehid = vehicleid)
                        {
			       PlayAudioStreamForPlayer(i,"http://yp.shoutcast.com/sbin/tunein-station.pls?id=8318"); // Passenger
			       SendClientMessage(playerid,GREEN,"Someone has turned on the radio.");
			       return 1;
		        }
		}
       }
    		}//
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)