30.06.2015, 07:08
Use GetVehicleModel
Also it would be the best if the sound plays from the train position than max volume at player's position, maybe?
Код:
TrainAirhornSwitch(playerid) { new vid = GetPlayerVehicleID(playerid); new vmodel = GetVehicleModel(vid); if(vmodel == 537|| vmodel == 538) { new Float:X, Float:Y, Float:Z; GetVehiclePos(vid, X, Y, Z); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerInRangeOfPoint(i, 30, X, Y, Z)) { PlayerPlaySound(i, 3201, 0, 0, 0); } } } return 1; }
Код:
PlayerPlaySound(i, 3201, X, Y, Z);