Command Effecting All Players on Server. - 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: Command Effecting All Players on Server. (
/showthread.php?tid=320899)
Command Effecting All Players on Server. -
Grant. - 25.02.2012
Hello Guys. Ive been experimenting a bit. I searched for about half an hour and I couldn't find anything to help me in my situation.
Basically I want an executable command that will then effect everyone
Код:
if(strcmp(cmd, "/nuke", true) == 0)
{
for (new i = 0; i < MAX_PLAYERS; i++)
{
// PlayAudioStreamForPlayer(playerid, "http://k003.kiwi6.com/hotlink/h779njgwom/halo_3_finish_the_fight.mp3", pos:X, pos:Y, pos:Z, 100, 1);
PlayAudioStreamForPlayer(i, "AUDIO HERE :D");
return 1;
}
}
by the "i" I want it to effect everyone, can somebody help us out?
Respuesta: Command Effecting All Players on Server. -
iKeN - 25.02.2012
pawn Код:
if( !strcmp(cmdtext, "/Command", true))
{
for( new i = 0; i != MAX_PLAYERS; i++)// Loop 500 players
{
if(!IsPlayerConnected(i))continue;// only connected players
PlayAudioStreamForPlayer(i, "http://k003.kiwi6.com/hotlink/h779njgwom/halo_3_finish_the_fight.mp3");// Action all players connected
}
return 1;
}
Re: Command Effecting All Players on Server. -
Grant. - 25.02.2012
Thankyou Kindly.