3 times the same output?
#7

It is not that simple, but should work: (Use a buffer string array and send its index instead of the string itself)

pawn Код:
new indexstrings[16][128];    //Global variable in your filterscript

public ShowInfoBoxPersonal(playerid, text[], time)
{
    new slot;
    Slots--;
    for(new i = 0; i < 16; i ++)    //This searches a free string in the indexstrings array
    {
        if(!strlen(indexstrings[i]))
        {
            slot = i;
            break;
        }
    }
    strcat(indexstrings[slot], text);    //store the text in the free string in the array
 
    SetTimers[Slots] = SetTimerEx("CreateBox", time, false, "ii", playerid, slot);     //send the index of the string in the array
    if(Slots == 0) { Slots = 3; }                        //instead of the array itself

    if(!ProcessingPersonal[playerid])
    {
    ProcessingPersonal[playerid] = 1;
    }
}


public CreateBox(playerid, slot)
{
    new text[128] = indesxstrings[slot];        //get the string back out of the array
    indexstrings[slot] = "";                          //at last, empty the string, so it can be used again
    printf("playerid = %d, text = %s",playerid,text);
   
    KillTimer(HideBox[playerid]);
    HideBox[playerid] = SetTimerEx("HideInfoBox",4500,false,"i",playerid);
    TextDrawHideForPlayer(playerid, InfoBox[playerid]);
    TextDrawSetString(InfoBox[playerid], text);
    TextDrawShowForPlayer(playerid, InfoBox[playerid]);
    return 1;
}
Reply


Messages In This Thread
3 times the same output? - by Whoop - 29.12.2010, 16:27
Re: 3 times the same output? - by Nero_3D - 29.12.2010, 17:03
Re: 3 times the same output? - by Whoop - 29.12.2010, 17:09
Re: 3 times the same output? - by Nero_3D - 29.12.2010, 17:25
Re: 3 times the same output? - by Whoop - 29.12.2010, 17:28
Re: 3 times the same output? - by Whoop - 30.12.2010, 08:15
Re: 3 times the same output? - by Mauzen - 30.12.2010, 09:27
Re: 3 times the same output? - by MadeMan - 30.12.2010, 09:40
Re: 3 times the same output? - by Hiddos - 30.12.2010, 09:44
Re: 3 times the same output? - by Whoop - 30.12.2010, 09:52

Forum Jump:


Users browsing this thread: 2 Guest(s)