SendClientMessage(playerid, 0xAA3333AA, "Nombre de la cancion.");
public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp(cmdtext, "/cancion", true))
{
for(new todos = 0; todos < MAX_PLAYERS; todos++)
{
if(IsPlayerConnected(todos))
{
PlayAudioStreamForPlayer(todos, "http://dl.dropbox.com/u/47982025/Musica/Where%20Them%20Girls%20At%20-%20David%20Guetta%20ft%20Nicki%20Minaj%2C%20Flo-Rida.mp3");
SendClientMessage(playerid, COLOR_BLANCO,"Reproduciendo Where Them Girls At - David Guetta ft Nicki Minaj, Flo-Rida.");
}
}
}
}
if (!strcmp(cmdtext, "/cancion", true))
{
for(new todos = 0; todos < MAX_PLAYERS; todos++)
{
if(IsPlayerConnected(todos))
{
PlayAudioStreamForPlayer(todos, "http://dl.dropbox.com/u/47982025/Musica/Where%20Them%20Girls%20At%20-%20David%20Guetta%20ft%20Nicki%20Minaj%2C%20Flo-Rida.mp3");
SendClientMessage(todos, COLOR_BLANCO,"Reproduciendo Where Them Girls At - David Guetta ft Nicki Minaj, Flo-Rida.");
}
}
pawn Код:
|
Lo que pasa es que al que uso el comando quiero que le salga no a todos los jugadores por eso quiro que solo lo mande al que uso el comando
|
if (!strcmp(cmdtext, "/cancion", true))
{
SendClientMessage(playerid, COLOR_BLANCO,"Reproduciendo Where Them Girls At - David Guetta ft Nicki Minaj, Flo-Rida.");
for(new todos = 0; todos < MAX_PLAYERS; todos++)
{
if(IsPlayerConnected(todos))
{
PlayAudioStreamForPlayer(todos, "http://dl.dropbox.com/u/47982025/Musica/Where%20Them%20Girls%20At%20-%20David%20Guetta%20ft%20Nicki%20Minaj%2C%20Flo-Rida.mp3");
SendClientMessage(todos, COLOR_BLANCO,"Reproduciendo Where Them Girls At - David Guetta ft Nicki Minaj, Flo-Rida.");
}
}
Haaa, Entonces asн:
pawn Код:
|
if (!strcmp(cmdtext, "/cancion", true))
{
SendClientMessage(playerid, COLOR_BLANCO,"Reproduciendo Where Them Girls At - David Guetta ft Nicki Minaj, Flo-Rida.");
for(new todos = 0; todos < MAX_PLAYERS; todos++)
{
if(IsPlayerConnected(todos))
{
PlayAudioStreamForPlayer(todos, "http://dl.dropbox.com/u/47982025/Musica/Where%20Them%20Girls%20At%20-%20David%20Guetta%20ft%20Nicki%20Minaj%2C%20Flo-Rida.mp3");
}
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp(cmdtext, "/cancion", true))
{
for(new todos = 0, slots = GetMaxPlayerS(); todos != slots; todos++) if(IsPlayerConnected(i))
PlayAudioStreamForPlayer(todos, "http://dl.dropbox.com/u/47982025/Musica/Where%20Them%20Girls%20At%20-%20David%20Guetta%20ft%20Nicki%20Minaj%2C%20Flo-Rida.mp3");
SendClientMessageToAll(-1,"Reproduciendo Where Them Girls At - David Guetta ft Nicki Minaj, Flo-Rida.");
return 1;
}
return 0;
}
FAIL, sigue mal, asн quedarнa bien:
pawn Код:
|
if (!strcmp(cmdtext, "/cancion", true)){
for(new todos = 0; todos <= MAX_PLAYERS; todos ++)
{
if(IsPlayerConnected(todos))
{
PlayAudioStreamForPlayer(todos, "http://dl.dropbox.com/u/47982025/Musica/Where%20Them%20Girls%20At%20-%20David%20Guetta%20ft%20Nicki%20Minaj%2C%20Flo-Rida.mp3");
SendClientMessageToAll(COLOR_BLANCO,"Reproduciendo Where Them Girls At - David Guetta ft Nicki Minaj, Flo-Rida.");
}
}
}