18.03.2016, 17:45
Hey guys, I found the info box on it is all fine except for one thing: hide is .. So please fix the code Thank you
#include "a_samp"
#define MAX_MESSAGES 10
new Text:InfoBox2[100];
forward IHide(playerid);
forward OnInfoBoxGameModeInit();
public OnInfoBoxGameModeInit(){
for(new i;i<GetMaxPlayers();i++){
InfoBox2[i] = TextDrawCreate(20.0, 120.0, "ERROR");
TextDrawUseBox(InfoBox2[i], true);
TextDrawBoxColor(InfoBox2[i], 0x00000080);
TextDrawTextSize(InfoBox2[i], 150.0, 40.0);
}
return 1;
}
stock InfoBox(playerid,time,text[]){
TextDrawHideForPlayer(playerid,InfoBox2[playerid]);
TextDrawSetString(InfoBox2[playerid],text);
TextDrawShowForPlayer(playerid,InfoBox2[playerid]);
SetTimerEx("IHide",time*1000,false,"i",playerid);
return true;
}
public IHide(playerid){
TextDrawHideForPlayer(playerid,InfoBox2[playerid]);
return true;
}