PlayAudioStreamForPlayer ... can't seem to get it to work.
#3

If they don't work, try using PRESSED instead.

pawn Code:
#define PRESSED(%0) \
    (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(PRESSED(KEY_SUBMISSION))
    {
        new Float:fPos[3];
        GetPlayerPos(playerid, fPos[0], fPos[1], fPos[2]);
        PlayAudioStreamForPlayer(playerid, "http://infinitumgaming.com/sounds/dual_horn.mp3", fPos[0], fPos[1], fPos[2], 30.0, 1);
    }
    else
    {
        //No need for getting positions here
        StopAudioStreamForPlayer(playerid);
    }
    return 1;
}
Just give it a try.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)