15.08.2012, 10:36
Hello I created textdraw for choose team but When I craeted for textdraw click it`s working without error but when i join in game I can`t click textdraw...I don`t know why..
Anyone can help me?
pawn Код:
Textdraw0 = TextDrawCreate(260.000000, 189.000000, "_");
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 1);
TextDrawLetterSize(Textdraw0, 0.500000, 11.599994);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw0, 0);
TextDrawSetProportional(Textdraw0, 1);
TextDrawSetShadow(Textdraw0, 1);
TextDrawUseBox(Textdraw0, 1);
TextDrawBoxColor(Textdraw0, 170);
TextDrawTextSize(Textdraw0, 380.000000, 31.000000);
Textdraw1 = TextDrawCreate(283.000000, 182.000000, "Team Selection");
TextDrawBackgroundColor(Textdraw1, 255);
TextDrawFont(Textdraw1, 2);
TextDrawLetterSize(Textdraw1, 0.200000, 1.000000);
TextDrawColor(Textdraw1, -1);
TextDrawSetOutline(Textdraw1, 1);
TextDrawSetProportional(Textdraw1, 1);
Textdraw2 = TextDrawCreate(262.000000, 207.000000, "_");
TextDrawBackgroundColor(Textdraw2, 255);
TextDrawFont(Textdraw2, 1);
TextDrawLetterSize(Textdraw2, 0.500000, 3.000000);
TextDrawColor(Textdraw2, -1);
TextDrawSetOutline(Textdraw2, 0);
TextDrawSetProportional(Textdraw2, 1);
TextDrawSetShadow(Textdraw2, 1);
TextDrawUseBox(Textdraw2, 1);
TextDrawBoxColor(Textdraw2, 714);
TextDrawTextSize(Textdraw2, 378.000000, 0.000000);
Textdraw3 = TextDrawCreate(283.000000, 215.000000, "Survivors");
TextDrawBackgroundColor(Textdraw3, 255);
TextDrawFont(Textdraw3, 2);
TextDrawLetterSize(Textdraw3, 0.330000, 1.100000);
TextDrawColor(Textdraw3, -1);
TextDrawSetOutline(Textdraw3, 0);
TextDrawSetProportional(Textdraw3, 1);
TextDrawSetShadow(Textdraw3, 1);
Textdraw4 = TextDrawCreate(262.000000, 243.000000, "_");
TextDrawBackgroundColor(Textdraw4, 255);
TextDrawFont(Textdraw4, 1);
TextDrawLetterSize(Textdraw4, 0.500000, 2.899999);
TextDrawColor(Textdraw4, -1);
TextDrawSetOutline(Textdraw4, 0);
TextDrawSetProportional(Textdraw4, 1);
TextDrawSetShadow(Textdraw4, 1);
TextDrawUseBox(Textdraw4, 1);
TextDrawBoxColor(Textdraw4, 255);
TextDrawTextSize(Textdraw4, 378.000000, 0.000000);
Textdraw5 = TextDrawCreate(289.000000, 250.000000, "Zombies");
TextDrawBackgroundColor(Textdraw5, 255);
TextDrawFont(Textdraw5, 2);
TextDrawLetterSize(Textdraw5, 0.360000, 1.000000);
TextDrawColor(Textdraw5, -267774465);
TextDrawSetOutline(Textdraw5, 0);
TextDrawSetProportional(Textdraw5, 1);
TextDrawSetShadow(Textdraw5, 1);
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(clickedid == Textdraw3)
{
SetPlayerTeam(playerid,1);//Survivors
SpawnPlayer(playerid);
CancelSelectTextDraw(playerid);
}
if(clickedid == Textdraw3)
{
SetPlayerTeam(playerid,2);//Zombies
SpawnPlayer(playerid);
CancelSelectTextDraw(playerid);
}
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys == KEY_FIRE)
{
SelectTextDraw(playerid, 0xA3B4C5FF);
}
return 1;
}