06.09.2010, 16:27
How can i make /play play in the vehicle so only me and who ever is in the car can hear it.This is my code right now.
I want to make it so like if the player dat does /play in the vehicle can hear it i want for the people dats in the vehicle with him can hear it also.Not just him.
Code:
dcmd_play(playerid, params[]) { #pragma unused playerid new audioid, bool:downmix, bool:loop, bool:pause; if (sscanf(params, "dddd", audioid, pause, loop, downmix)) { SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /play <audioid> <pause (0/1)> <loop (0/1)> <downmix (0/1)>"); return 1; } /*for(new i; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { Audio_Play(i,audioid, pause, loop, downmix); //Use i instead of playerid here } }*/ new vehicleid = GetPlayerVehicleID(playerid); if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER || GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) { Audio_Play(playerid,audioid, pause, loop, downmix); //Use i instead of playerid here return 1; }