30.12.2010, 09:27
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;
}