26.12.2014, 20:36
Hello need help with this code :
i have 17 cars ( my car variable is PasienioCar[0-16])that i want to play this file when i press H but its doesnt play anything
i have tested this with :
its working but if i get to the car and press h its not working , i think is about vehicle id but i dont know how to make work please help
Код:
if (PRESSED(KEY_CTRL_BACK)) { //if(PlayerInfo[playerid][JobID] == 15) //{ if(IsPlayerInAnyVehicle(playerid)) { for(new i=0; i<sizeof(PasienioCar); i++) { if(GetPlayerVehicleID(playerid) == PasienioCar[i]) { if(UsedH[playerid] == false) { new Float:X, Float:Y, Float:Z, Float:Distance = 5.0; GetPlayerPos(playerid, X, Y, Z); PlayAudioStreamForPlayer(playerid, "http://127.0.0.1/siren/sound_011.wav", X, Y, Z, Distance, 1); UsedH[playerid] = true; } else if(UsedH[playerid] == true) { StopAudioStreamForPlayer(playerid); UsedH[playerid] = false; } } } } //} }
i have tested this with :
Код:
if(strcmp(cmdtext, "/play", true) == 0) { new Float:X, Float:Y, Float:Z, Float:Distance = 5.0; GetPlayerPos(playerid, X, Y, Z); PlayAudioStreamForPlayer(playerid, "http://127.0.0.1/siren/sound_011.wav", X, Y, Z, Distance, 1); }