SA-MP Forums Archive
Esta mal este comando? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: Esta mal este comando? (/showthread.php?tid=432611)



Esta mal este comando? - benjas09 - 23.04.2013

PHP код:
COMMAND:radiotoalle(playeridparams[])
{
if(
IsPlayerAdmin(playerid))
    {
    if(!
sscanf(params"i"params[0]))
      {
for (new 
iMAX_PLAYERSi++)
if (
IsPlayerConnected(i))
PlayAudioStreamForPlayer(iparams[0]);
}
}
    return 
1;

El comando lo que tendria que hacer es que al poner "/radiotoalle LINKSTREAM" lo reprodusca en todos los usuarios, y no me funciona


Respuesta: Esta mal este comando? - adri1 - 23.04.2013

Serнa:
pawn Код:
COMMAND:radiotoalle(playerid, params[])
{
assert(IsPlayerAdmin(playerid));

if(sscanf(params, "s[64]", params)) return SendClientMessage(playerid, -1, "error, use formato: /radiotoalle [LINK]");

for (new i; i < GetMaxPlayers(); i++)
{
if (IsPlayerConnected(i)) PlayAudioStreamForPlayer(i, params);
}

return 1;
}
i es para una integer.