How can I make this work?
#1

pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    for(new h = 0; h < sizeof(HouseInfo); h++)
    {
        if ( pickupid == HousePickup[h] )
        {
            new Float:X, Float:Y, Float:Z;
            GetPlayerPos(playerid, X,Y,Z);
            PlayerPlaySound(playerid, 1139, X, Y, Z);
        }
    }
    return 1;
}
How can I stop my function to play the sound all the time when I'm on my house pickup? If I stay on the house pickup all the time, it just reproduces the sound all the time and it becomes annoying.
Thanks for help.
Reply
#2

Simply add "break;" after "PlayerPlaySound".

Or move the "return 1;" just after PlayerPlaySound. (recommended)
Reply
#3

i would recomend you to set a timer
Reply
#4

Thank you guys, reputation up...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)