Pickup doesn't create
#1

pawn Код:
enum Horses
{
    Float:hx,
    Float:hy,
    Float:hz,
    order
}
new hcord[][Horses] =
{
    {2323.7659,1283.2438,97.5738,1},
    {1432.0463,2751.2932,19.5234,2},
    {-144.1049,1231.6788,26.2031,3},
    {-688.2123,938.3978,13.6328,4},
    {-1531.5845,687.4770,133.0514,5}
};

//OnFilterScriptInit
horse[0] = CreatePickup(954, 1, 2011.8767,1544.7483,9.4787, 0);
for(new x = 0; x < sizeof(hcord); x++)
{
    horse[hcord[x][order]] = CreatePickup(954, 1, hcord[x][hx], hcord[x][hy], hcord[x][hy], 0);
}
But it doesn't create the pickup.
The pickup 0 is exceptional because as you can see i code that manually.
Reply
#2

Here's your problem:

pawn Код:
for(new x = 0; x < sizeof(hcord); x++)
{
    horse[hcord[x][order]] = CreatePickup(954, 1, hcord[x][hx], hcord[x][hy], hcord[x][hy], 0);
}
That code works, except that you are creating the pickup at:

X: hcord[x][hx]
Y: hcord[x][hy]
Z: hcord[x][hy] - Should be hz

Try this:

pawn Код:
for(new x = 0; x < sizeof(hcord); x++)
{
    horse[hcord[x][order]] = CreatePickup(954, 1, hcord[x][hx], hcord[x][hy], hcord[x][hz], 0);
}
Reply
#3

CTRL + C and CTRL + V can be dangerous!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)