Ajuda sistema de radio
#1

pawn Код:
C:\Users\Nauan\AppData\Local\Temp\Rar$DI18.848\radio_eng.pwn(108) : error 017: undefined symbol "StopAudioStreamForPlayer"
C:\Users\Nauan\AppData\Local\Temp\Rar$DI18.848\radio_eng.pwn(122) : error 017: undefined symbol "StopAudioStreamForPlayer"
C:\Users\Nauan\AppData\Local\Temp\Rar$DI18.848\radio_eng.pwn(129) : error 017: undefined symbol "StopAudioStreamForPlayer"
C:\Users\Nauan\AppData\Local\Temp\Rar$DI18.848\radio_eng.pwn(130) : error 017: undefined symbol "PlayAudioStreamForPlayer"
Linha 108 StopAudioStreamForPlayer(playerid);
Linha 122 StopAudioStreamForPlayer(playerid);
linha 129 StopAudioStreamForPlayer(playerid);
linha 130 PlayAudioStreamForPlayer(playerid,StationUrl[online - 1][0]);


SISTEMA TODO
pawn Код:
#include <a_samp>

#undef MAX_PLAYERS
#define MAX_PLAYERS 25

main()
{
    print("FS Online radio in cars loaded.");
    print("Author: SDraw");
}

forward PlayVehicleRadioForPlayer(playerid,online);
forward NonChangeRadio(playerid);
forward IsAVel(vehicleid);
forward HideStationTitle(playerid);

new VehRadio[MAX_VEHICLES];
new PassengerInCar[MAX_VEHICLES][8];

new bool:WaitForBuf[MAX_PLAYERS];
new PassengerSeat[MAX_PLAYERS];
new OldCar[MAX_PLAYERS];

new Float:StationTextCoords[16][2] = {
    {225.0,20.0},{280.0,20.0},{265.0,20.0},{265.0,20.0},
    {260.0,20.0},{250.0,20.0},{235.0,20.0},{265.0,20.0},
    {255.0,20.0},{270.0,20.0},{260.0,20.0},{250.0,20.0},
    {255.0,20.0},{255.0,20.0},{270.0,20.0},{270.0,20.0}
};

new StationTitle[16][1][64] = {
    {"CJRS Radio Montreal"}, {"Radio BN"}, {"ZenRadio.FM"},
    {"METAL ONLY"}, {"Radio Paloma"}, {"MUSIK.Extream"},
    {"Techno4ever Radio"},{"DEFJAY.COM"}, {"TechnoBase.FM"},
    {"Music One"}, {"Radio Jackie"},{"Suburds of Goa"},
    {"Groove Salad"}, {"AAN Country"},{"KickRadio"},{"Radio Off"}
};

new StationUrl[15][1][64] = {
    {"http://38.96.148.21:8138"},{"http://69.64.32.49:8000"},{"http://188.165.56.222:8800"},
    {"http://80.237.157.91:4400"},{"http://80.237.184.27:80"},{"http://scfire-ntc-aa01.stream.aol.com:80/stream/1052"},
    {"http://89.149.245.248:800"},{"http://83.169.60.56:80"},{"http://80.237.211.43:80"},
    {"http://85.186.77.203:8000"},{"http://95.154.211.15:12614"},{"http://74.63.47.82:8850"},
    {"http://74.63.47.82:8032"},{"http://76.10.222.237:9002"},{"http://173.193.202.87:9000"}
};

new Text:StationText[16];

public OnFilterScriptInit()
{
    print("----------------------------------");
    print("FS Online Radio In Vehicles Loaded");
    print("Author: SDraw");
    print("----------------------------------");
    for(new i = 0; i < MAX_VEHICLES; i++)
    {
        VehRadio[i] = 2;
        for(new s = 1; s < 8; s++) PassengerInCar[i][s] = INVALID_PLAYER_ID;
    }
    for(new t = 0; t < 16; t++)
    {
        StationText[t] = TextDrawCreate(StationTextCoords[t][0],StationTextCoords[t][1],StationTitle[t][0]);
        TextDrawAlignment(StationText[t],0);
        TextDrawBackgroundColor(StationText[t],0x000000ff);
        TextDrawFont(StationText[t],2);
        TextDrawLetterSize(StationText[t],0.4,1.6);
        TextDrawColor(StationText[t],0x906010ff);
        TextDrawSetOutline(StationText[t],1);
        TextDrawSetProportional(StationText[t],2);
        TextDrawSetShadow(StationText[t],1);
    }
    return 1;
}

public OnPlayerConnect(playerid)
{
    WaitForBuf[playerid] = false;
    OldCar[playerid] = INVALID_VEHICLE_ID;
    PassengerSeat[playerid] = 0;
    return 0;
}

public OnPlayerDisconnect(playerid)
{
    if(OldCar[playerid] != INVALID_VEHICLE_ID) PassengerInCar[OldCar[playerid]][PassengerSeat[playerid]] = INVALID_PLAYER_ID;
    return 0;
}

public OnPlayerStateChange(playerid,newstate,oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
    {
        new veh = GetPlayerVehicleID(playerid);
        if(IsAVel(veh)) return 0;
        new seat = GetPlayerVehicleSeat(playerid);
        if(seat != 0)
        {
            PassengerInCar[veh][seat] = playerid;
            PassengerSeat[playerid] = seat;
            OldCar[playerid] = veh;
        }
        PlayVehicleRadioForPlayer(playerid,VehRadio[veh]);
    }
    if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER)
    {
        new veh = GetPlayerVehicleID(playerid);
        if(IsAVel(veh)) return 0;
        StopAudioStreamForPlayer(playerid);
        if(OldCar[playerid] != INVALID_VEHICLE_ID)
        {
            PassengerInCar[OldCar[playerid]][PassengerSeat[playerid]] = INVALID_PLAYER_ID;
            OldCar[playerid] = INVALID_VEHICLE_ID;
        }
    }
    return 0;
}

public PlayVehicleRadioForPlayer(playerid,online)
{
    if(online == 0)
    {
        StopAudioStreamForPlayer(playerid);
        TextDrawShowForPlayer(playerid,StationText[15]);
        WaitForBuf[playerid] = true;
        SetTimerEx("NonChangeRadio",5000,false,"i",playerid);
        SetTimerEx("HideStationTitle",3500,false,"i",playerid);
        return 1;
    }
    StopAudioStreamForPlayer(playerid);
    PlayAudioStreamForPlayer(playerid,StationUrl[online - 1][0]);
    TextDrawShowForPlayer(playerid,StationText[online - 1]);
    WaitForBuf[playerid] = true;
    SetTimerEx("NonChangeRadio",5000,false,"i",playerid);
    SetTimerEx("HideStationTitle",3500,false,"i",playerid);
    return 1;
}

public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{
    if(newkeys == KEY_ACTION)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
            {
                new veh = GetPlayerVehicleID(playerid);
                if(IsAVel(veh)) return 0;
                if(WaitForBuf[playerid]) return SendClientMessage(playerid,0xFF0000FF,"* Wait for 5 second. Then you'll be able to change radiostation.");
                VehRadio[veh]++;
                if(VehRadio[veh] == 16) VehRadio[veh] = 0;
                PlayVehicleRadioForPlayer(playerid,VehRadio[veh]);
                for(new s = 1; s < 8; s++)
                {
                        if(PassengerInCar[veh][s] != INVALID_PLAYER_ID) PlayVehicleRadioForPlayer(PassengerInCar[veh][s],VehRadio[veh]);
                }
            }
        }
    }
    if(newkeys == 132)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
            {
                new veh = GetPlayerVehicleID(playerid);
                if(IsAVel(veh)) return 0;
                if(WaitForBuf[playerid]) return SendClientMessage(playerid,0xFF0000FF,"* Wait for 5 second. Then you'll be able to change radiostation.");
                VehRadio[veh]--;
                if(VehRadio[veh] == -1) VehRadio[veh] = 15;
                PlayVehicleRadioForPlayer(playerid,VehRadio[veh]);
                for(new s = 1; s < 8; s++)
                {
                    if(PassengerInCar[veh][s] != INVALID_PLAYER_ID) PlayVehicleRadioForPlayer(PassengerInCar[veh][s],VehRadio[veh]);
                }
            }
        }
    }
    return 0;
}

public NonChangeRadio(playerid)
{
    WaitForBuf[playerid] = false;
    return 1;
}

public HideStationTitle(playerid)
{
    for(new i = 0; i < 16; i++) TextDrawHideForPlayer(playerid,StationText[i]);
    return 1;
}

public IsAVel(vehicleid)
{
    new model = GetVehicleModel(vehicleid);
    if(model == 481 || model == 509 || model == 510) return 1;
    return 0;
}
Reply
#2

atualiza suas includes
Reply
#3

Atualize suas includes para 0.3D...
Reply
#4

como assim ?
Reply
#5

Suas includes estao desatualizadas para atualizalas apenas baixe:

Clique Aki!
Reply
#6

Vocк tб usando a versгo 0.3c

Essas funзхes sгo da 0.3d
Reply
#7

mais eu to usando 0.3d e tipo eu nao tentei copila dentro da pasta nao
Reply
#8

Cara, abre o arquivo pawno que possui dentro do 0.3D. Abra seu gm por aquele pawno e tenta compilar!!!
Reply
#9

fis isso o erro continuou
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)