02.04.2013, 16:09
Hello guys, well my textdraws seems not to work at all.
You see the textdraw, you are set into the Textdraw selection but you cannot click it. Once you click it nothing happens.
Код:
new Text:JoinArena; new ArenaStarted; //GameModeInit JoinArena = TextDrawCreate(503.000000, 389.000000, "Join Arena"); TextDrawBackgroundColor(JoinArena, 255); TextDrawFont(JoinArena, 1); TextDrawLetterSize(JoinArena, 0.519999, 1.600000); TextDrawColor(JoinArena, -1); TextDrawSetOutline(JoinArena, 0); TextDrawSetProportional(JoinArena, 1); TextDrawSetShadow(JoinArena, 1); TextDrawTextSize(JoinArena, 15.0, 75.0); public OnPlayerClickTextDraw(playerid, Text:clickedid) { if(_:clickedid != INVALID_TEXT_DRAW) { if(clickedid == JoinArena) { if(ArenaStarted == 1) { SendClientMessage(playerid, COLOR_RED, "Arena already started. Putting you in queue!"); TextDrawHideForPlayer(playerid, JoinArena); return 1; } else { SendClientMessage(playerid, COLOR_YELLOW, "<!>Bla!"); CancelSelectTextDraw(playerid); } } return 1; } return 1; } public OnPlayerConnect(playerid) { TextDrawSetSelectable(JoinArena, true); SelectTextDraw(playerid, 0x00FF00FF); PlayerTextDrawSetSelectable(playerid, PlayerText:JoinArena, 1); TextDrawShowForPlayer(playerid, JoinArena); return 1; } forward ArenaStarts(); public ArenaStarts() //Starts the ArenaStarts timer, which is the queue timer. If the player is in queue he will get Tp-ed into the arena { foreach (new i : Player) { ArenaStarted = 0; SendClientMessageToAll(COLOR_YELLOW, "ARENA IS FINISHED! Enter the queue in order to join arena!"); SetTimer("ArenaJoin", 30000, false); SetTimerEx("count1", 1000, false, "i", i); //SetArenaPos - being worked. } return 1; } forward ArenaStart(); public ArenaStart() //Starts the actual arena, also sets the arenastarted to 1 so players cannot join it. They can only join the queue { foreach (new i : Player) { ArenaStarted = 1; SetTimer("ArenaStarts", 90000, false); } return 1; }