OnPlayerCommandText -> Permanent - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OnPlayerCommandText -> Permanent (
/showthread.php?tid=603662)
OnPlayerCommandText -> Permanent -
Melktert - 26.03.2016
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;
}
Re: OnPlayerCommandText -> Permanent -
Harty - 26.03.2016
Waht you mean ??
Re: OnPlayerCommandText -> Permanent -
Melktert - 26.03.2016
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.
Re: OnPlayerCommandText -> Permanent -
Mencent - 26.03.2016
Hi!
You put this into the public
OnGameModeInit:
PHP код:
PlayAudioStreamForPlayer(playerid, "https://control.internet-radio.com:2199/tunein/energy106/playlist.pls", X, Y, Z, Distance, 10);
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.