size array prob
#6

Quote:
Originally Posted by [FU]Victious
Посмотреть сообщение
But do you an enum or what..?
Yes, 256. I tried with 30 first, then increased it to see if it mattered. Here's my whole enum + stock + calling the stock.

pawn Код:
enum pQuest
{
    CurrentSlot,
    Spawn,
    Hilltop,
    Terminal,
    Ranch,
    Montgomery,
    Dillimore,
    Palomino,
    Slot1,
    Slot2,
    Slot3,
    Slot4,
    Slot5,
    Title1[128],
    Title2[128],
    Title3[128],
    Title4[128],
    Title5[128],
    Info1[256],
    Info2[256],
    Info3[256],
    Info4[256],
    Info5[256],
    Reward1[128],
    Reward2[128],
    Reward3[128],
    Reward4[128],
    Reward5[128],
    Float:X1,
    Float:X2,
    Float:X3,
    Float:X4,
    Float:X5,
    Float:Y1,
    Float:Y2,
    Float:Y3,
    Float:Y4,
    Float:Y5,
    Float:Z1,
    Float:Z2,
    Float:Z3,
    Float:Z4,
    Float:Z5,
    Float:R1,
    Float:R2,
    Float:R3,
    Float:R4,
    Float:R5,
    Msg1[128],
    Msg2[128],
    Msg3[128],
    Msg4[128],
    Msg5[128],
    ID1,
    ID2,
    ID3,
    ID4,
    ID5,
}
new PlayerQuest[MAX_PLAYERS][pQuest];
pawn Код:
stock SetQuest(playerid, questid, msg[], title[], info[], reward[], Float:CPX, Float:CPY, Float:CPZ, Float:CPR)
{
    if(PlayerQuest[playerid][Slot1] < 0)
    {
        PlayerQuest[playerid][Slot1] = questid;
        PlayerQuest[playerid][Title1] = title;
        PlayerQuest[playerid][Info1] = info;
        PlayerQuest[playerid][Reward1] = reward;
        PlayerQuest[playerid][Msg1] = msg;
        PlayerQuest[playerid][X1] = CPZ;
        PlayerQuest[playerid][Y1] = CPY;
        PlayerQuest[playerid][Z1] = CPZ;
        PlayerQuest[playerid][R1] = CPR;
        PlayerQuest[playerid][CurrentSlot] = 1;
    }
    else if(PlayerQuest[playerid][Slot2] < 0)
    {
        PlayerQuest[playerid][Slot2] = questid;
        PlayerQuest[playerid][Title2] = title;
        PlayerQuest[playerid][Info2] = info;
        PlayerQuest[playerid][Reward2] = reward;
        PlayerQuest[playerid][Msg2] = msg;
        PlayerQuest[playerid][X2] = CPZ;
        PlayerQuest[playerid][Y2] = CPY;
        PlayerQuest[playerid][Z2] = CPZ;
        PlayerQuest[playerid][R2] = CPR;
        PlayerQuest[playerid][CurrentSlot] = 2;
    }
    else if(PlayerQuest[playerid][Slot3] < 0)
    {
        PlayerQuest[playerid][Slot3] = questid;
        PlayerQuest[playerid][Title3] = title;
        PlayerQuest[playerid][Info3] = info;
        PlayerQuest[playerid][Reward3] = reward;
        PlayerQuest[playerid][Msg3] = msg;
        PlayerQuest[playerid][X3] = CPZ;
        PlayerQuest[playerid][Y3] = CPY;
        PlayerQuest[playerid][Z3] = CPZ;
        PlayerQuest[playerid][R3] = CPR;
        PlayerQuest[playerid][CurrentSlot] = 3;
    }
    else if(PlayerQuest[playerid][Slot4] < 0)
    {
        PlayerQuest[playerid][Slot4] = questid;
        PlayerQuest[playerid][Title4] = title;
        PlayerQuest[playerid][Info4] = info;
        PlayerQuest[playerid][Reward4] = reward;
        PlayerQuest[playerid][Msg4] = msg;
        PlayerQuest[playerid][X4] = CPZ;
        PlayerQuest[playerid][Y4] = CPY;
        PlayerQuest[playerid][Z4] = CPZ;
        PlayerQuest[playerid][R4] = CPR;
        PlayerQuest[playerid][CurrentSlot] = 4;
    }
    else if(PlayerQuest[playerid][Slot5] < 0)
    {
        PlayerQuest[playerid][Slot5] = questid;
        PlayerQuest[playerid][Title5] = title;
        PlayerQuest[playerid][Info5] = info;
        PlayerQuest[playerid][Reward5] = reward;
        PlayerQuest[playerid][Msg5] = msg;
        PlayerQuest[playerid][X5] = CPZ;
        PlayerQuest[playerid][Y5] = CPY;
        PlayerQuest[playerid][Z5] = CPZ;
        PlayerQuest[playerid][R5] = CPR;
        PlayerQuest[playerid][CurrentSlot] = 5;
    }
    SendClientMessageFormatted(playerid, COLOR_WHITE,"QUEST: %s",msg);
    //Textdraw - info
    SetPlayerCheckpoint(playerid, CPX, CPY, CPZ, CPR);
    GameTextForPlayer(playerid, "~w~Quest Accepted", 4000, 0);
    return 1;
}
pawn Код:
if(dialogid == 5055)
    {
        if(response == 1)
        {
            SetQuest(playerid, 1, "Talk to the leader of Hilltop Fort.", "... I'll Scratch Yours", "Travel to Hilltop Fort, located in the hills north-west of Gate B2.\n\nTalk to the leader of the Fort and tell him Sergeant Wyatt sent you.\n\nMaybe he's got some work for you.", "- 50 XP\n- 2 Bandage\n1 Small Medkit", 1242.7507,-316.7700,9.4604, 5.0);
        }
    }
Fix it and you get an internetz.
Reply


Messages In This Thread
size array prob - by MestreKiller - 17.12.2010, 19:07
Re: size array prob - by WillyP - 17.12.2010, 19:08
Re: size array prob - by MestreKiller - 17.12.2010, 19:09
Re: size array prob - by CrucixTM - 17.12.2010, 19:14
Re: size array prob - by WillyP - 17.12.2010, 19:16
Re: size array prob - by CrucixTM - 17.12.2010, 19:21
Re: size array prob - by WillyP - 17.12.2010, 19:23
Re: size array prob - by Mauzen - 17.12.2010, 19:24
Re: size array prob - by CrucixTM - 17.12.2010, 19:25
Re: size array prob - by CrucixTM - 17.12.2010, 19:27

Forum Jump:


Users browsing this thread: 2 Guest(s)