14.06.2013, 12:50
En esta callback agreguй lo siguiente:
Y luego lo que hice fue poner en la callback public OnPlayerStateChange(playerid, newstate, oldstate), esto:
Y no me funciona, cual es el problemaaї?
Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success) { if(success) { return 1; } if (strcmp(cmd, "/ponermusica", true) == 0) { ReproducirMusica[playerid] = 1; if(ReproducirMusica[playerid] > 0) { PlayAudioStreamForPlayer(playerid, "http://dc195.4shared.com/img/1630214316/f61b0a73/dlink__2Fdownload_2FFiINRnNc_3Ftsid_3D20130613-101904-44f63b80/preview.mp3"); } return 1; } if (strcmp(cmd, "/pararmusica", true) == 0) { ReproducirMusica[playerid] = 0; return 1; } return 0; }
Код:
public OnPlayerStateChange(playerid, newstate, oldstate) { if(ReproducirMusica[playerid] == 0) { StopAudioStreamForPlayer(playerid); } return 1; }