[AYUDA]Sistema de radio
#6

Entonces seria de la primera forma que puse por que la funciуn es individual para cada jugador.

pawn Код:
//Arriba de todo
new CancionActual[MAX_PLAYERS];

public PlayVehicleRadioForPlayer(playerid,online)
{
    if(online == 0)
    {
        StopAudioStreamForPlayer(playerid);
        WaitForBuf[playerid] = true;
        SetTimerEx("NonChangeRadio",1000,false,"i",playerid);
        RadioInfo[playerid] = 0;
        return 1;
    }
    StopAudioStreamForPlayer(playerid);
    PlayAudioStreamForPlayer(playerid,RadioParams[online - 1][URL]);
    WaitForBuf[playerid] = true;
    RadioInfo[playerid] = 1;
    CancionActual[playerid] = online-1; //linea agregada
    SetTimerEx("NonChangeRadio",1000,false,"i",playerid);
    return 1;
}

//En el comando
  if (strcmp("/info", cmdtext, true, 10) == 0)
    {
        if(!IsPlayerInAnyVehicle(playerid)) return 0;
        if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return 0;
        new veh = GetPlayerVehicleID(playerid);
        if(IsAVel(veh)) return 0;
        new string[124];
        format(string, sizeof(string), "Tнtulo %s", RadioParams[CancionActual[playerid]][Titulo]);
        SendClientMessage(playerid, -1, string);
        return 1;
    }
Reply


Messages In This Thread
[AYUDA]Sistema de radio - by Fluid016 - 15.04.2012, 02:54
Re: [AYUDA]Sistema de radio - by Daniel-92 - 15.04.2012, 03:09
Respuesta: [AYUDA]Sistema de radio - by Fluid016 - 15.04.2012, 03:47
Re: [AYUDA]Sistema de radio - by Daniel-92 - 15.04.2012, 04:11
Respuesta: [AYUDA]Sistema de radio - by Fluid016 - 15.04.2012, 04:38
Re: [AYUDA]Sistema de radio - by Daniel-92 - 15.04.2012, 04:58
Respuesta: [AYUDA]Sistema de radio - by Fluid016 - 15.04.2012, 05:09

Forum Jump:


Users browsing this thread: 1 Guest(s)