FANDOM


Ova funkcija pušta muziku igraču. (MP3 itd.)


Parameters: 

(playerid, url[], Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0, usepos = 0)

playerid // ID igrača kojem puštamo muziku

url[] // Url pjesme, ili muzike.

Float:PosX  // X položaj na kojem se čuje zvuk.

Float:PosY  // Y položaj na kojem se čuje zvuk.

Float:PosZ  // Z položaj na kojem se čuje zvuk.

Float:distance // Udaljenost na kojoj se čuje zvuk.

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/radio", cmdtext, true) == 0) 
    {
        PlayAudioStreamForPlayer(playerid, "http://somafm.com/tags.pls");
        return 1;
    }
    if (strcmp("/radiopos", cmdtext, true) == 0)
    {
        new Float:X, Float:Y, Float:Z, Float:Distance = 5.0;
        GetPlayerPos(playerid, X, Y, Z);
	PlayAudioStreamForPlayer(playerid, "http://somafm.com/tags.pls", X, Y, Z, Distance, 1);
	return 1;
    }
    return 0;

}

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.