Problem with Textdraw -
Rockyyy - 11.04.2015
Hey i have problem in my Textdraw it disappears when player leaves the server and appears again in few seconds idk whats wrong with that, here is the code,
Код:
new Text:ServerMSG;
new RMessages[][] =
{
"~g~Use /help and /cmds to know more about the server.",
"~g~Seen any hacker? Use /report [ID][REASON].",
"~g~Need any help? Feel free to ask any admin online."
};
UNDER ONGAMEMODEINIT ___ IF numbers used needed tell me
Код:
SetTimer("MSG", 8000, true);
ServerMSG = TextDrawCreate(Removed, Removed, "Server MSG");
TextDrawColor(ServerMSG, Light_Blue);
TextDrawFont(ServerMSG, Removed);
TextDrawLetterSize(ServerMSG, Removed, Removed);
TextDrawSetProportional(ServerMSG, Removed);
TextDrawSetOutline(ServerMSG, Removed);
TextDrawSetShadow(ServerMSG, Removed);
TextDrawBackgroundColor(ServerMSG, White);
TextDrawUseBox(ServerMSG, Removed);
TextDrawBoxColor(ServerMSG, Gray);
TextDrawTextSize(ServerMSG, Removed, Removed);
UNDER ONPLAYERDISCONNECT
TextDrawHideForPlayer(playerid, ServerMSG);
///////////////////
Код:
public MSG()
{
TextDrawSetString(ServerMSG, RMessages[random(sizeof(RMessages))]);
return 1;
}
UNDER ON PLAYER SPAWN
Код:
TextDrawSetString(ServerMSG, RMessages[random(sizeof(RMessages))]);
TextDrawShowForPlayer(playerid, ServerMSG);
Re: Problem with Textdraw -
JaKe Elite - 11.04.2015
I am not pretty sure about the disappearing thing but i am pretty sure you doing it wrong on placing this code OnPlayerSpawn
PHP код:
TextDrawSetString(ServerMSG, RMessages[random(sizeof(RMessages))]);
You already have a timer which does that, why you add this code again on player spawn.
Remove it.
Re: Problem with Textdraw -
Rockyyy - 11.04.2015
Ok Jake i'll try that, any other ideas ?
Re: Problem with Textdraw -
Rockyyy - 12.04.2015
Not fixed, it now disappears and don't appear
Re: Problem with Textdraw -
Rockyyy - 16.04.2015
Anyone ?
Re: Problem with Textdraw -
Azula - 16.04.2015
PHP код:
new s[128];
format(s,sizeof(s),"%s",RMessages[random(sizeof(RMessages))]);
TextDrawSetString(ServerMSG,s);
TextDrawShowForPlayer(playerid, ServerMSG);
Re: Problem with Textdraw -
ATGOggy - 16.04.2015
PHP код:
public MSG()
{
TextDrawSetString(ServerMSG, RMessages[random(sizeof(RMessages))]);
TextDrawShowForAll(ServerMSG);
return 1;
}
and remove these codes from OnPlayerConnect and OnPlayerDisconnect.
Re: Problem with Textdraw -
Rockyyy - 01.05.2015
sorry for late respond, The problem is still happening not fixed
Re: Problem with Textdraw -
Evocator - 01.05.2015
Thats a single textdraw you're using which cannot be modified and set to a new value per player, you need to use
PlayerTextDraws instead.
Re: Problem with Textdraw -
tantri - 01.05.2015
first make it clear do you want to show different textdraws to different players? or the same textdraws to all players?