Array with float and integer ?
#3

so basically, you want an array with float & integer values?
impossible.
But can be made possible if we "cheat" a little bit

pawn Код:
#include <a_samp>

new Float:RandomCarSpawn[][] =
{
    {Float:427,2239.6694,2441.9373,3.4053,88.4534,Float:0,Float:1},
    {Float:427,2239.6694,2441.9373,3.4053,88.4534,Float:0,Float:1},
    {Float:427,2239.6694,2441.9373,3.4053,88.4534,Float:0,Float:1},
    {Float:427,2239.6694,2441.9373,3.4053,88.4534,Float:0,Float:1},
    {Float:427,2239.6694,2441.9373,3.4053,88.4534,Float:0,Float:1},
    {Float:427,2239.6694,2441.9373,3.4053,88.4534,Float:0,Float:1}
    //and so on
};

public OnFilterScriptInit()
{

    for(new i=0,x; i<80; i++)//spawn 80 cars from the list (some be spawned multiple times ofc. its jsut an example)
    {
        x = random(sizeof RandomCarSpawn);
        AddStaticVehicle(_:RandomCarSpawn[x][0],
                         RandomCarSpawn[x][1],
                         RandomCarSpawn[x][2],
                         RandomCarSpawn[x][3],
                         RandomCarSpawn[x][4],
                         _:RandomCarSpawn[x][5],
                         _:RandomCarSpawn[x][6]);
    }
   
    return 1;
}
Reply


Messages In This Thread
Array with float and integer ? - by DiamantEspace18 - 03.01.2015, 17:22
Re: Array with float and integer ? - by Lordzy - 03.01.2015, 17:27
AW: Array with float and integer ? - by CutX - 03.01.2015, 17:32
Re : Array with float and integer ? - by DiamantEspace18 - 03.01.2015, 17:44
Re: Array with float and integer ? - by dominik523 - 03.01.2015, 17:45
Re : Array with float and integer ? - by DiamantEspace18 - 03.01.2015, 17:48
AW: Re: Array with float and integer ? - by CutX - 03.01.2015, 17:53
Re : Array with float and integer ? - by DiamantEspace18 - 03.01.2015, 18:05
Re: Array with float and integer ? - by Mauzen - 03.01.2015, 18:19
Re : Array with float and integer ? - by DiamantEspace18 - 03.01.2015, 18:24

Forum Jump:


Users browsing this thread: 1 Guest(s)