OnPlayerCommandText -> Permanent
#1

So basically, I want to take out this command, and put it into the script permanently with the coordinates in that field.

Код:
    if (strcmp("/djradio", cmdtext, true) == 0)
    {
        new Float:X, Float:Y, Float:Z, Float:Distance = 15.0;
        GetPlayerPos(playerid, X, Y, Z);
		PlayAudioStreamForPlayer(playerid, "https://control.internet-radio.com:2199/tunein/energy106/playlist.pls", X, Y, Z, Distance, 10);
	return 1;
    }
Reply
#2

Waht you mean ??
Reply
#3

Adding the coordinates of where I want it, then into the gamemode code. Then it's always there and I don't have to keep typing /djradio

EDIT: Even on server restart.
Reply
#4

Hi!

You put this into the public OnGameModeInit:
PHP код:
PlayAudioStreamForPlayer(playerid"https://control.internet-radio.com:2199/tunein/energy106/playlist.pls"XYZDistance10); 
But you have to fill in the coordinates into the variables X,Y,Z.
You can save the positions with "/save .." in game and then you can find the position here: Documents/Grand Theft Auto San Andreas/savepositions
Something like that.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)