16.03.2015, 14:01
(
Последний раз редактировалось TheSperm; 16.03.2015 в 14:48.
)
hey, im trying to make selectable textdraws using TDeditor for my new DM server but when i put the curse at any selectable textdraw it don't change the text color and also won't respond when i click at it
here is my codes
here is my codes
pawn Код:
//This on OnGameModeInit
TDEditor_TD[0] = TextDrawCreate(207.071823, 116.500053, "Welcome_to_United_Team_Deathmatch");
TextDrawLetterSize(TDEditor_TD[0], 0.509229, 3.626663);
TextDrawTextSize(TDEditor_TD[0], 427.325775, 4.179999);
TextDrawAlignment(TDEditor_TD[0], 1);
TextDrawColor(TDEditor_TD[0], -1);
TextDrawUseBox(TDEditor_TD[0], 1);
TextDrawBoxColor(TDEditor_TD[0], 255);
TextDrawSetShadow(TDEditor_TD[0], 0);
TextDrawSetOutline(TDEditor_TD[0], 0);
TextDrawBackgroundColor(TDEditor_TD[0], 255);
TextDrawFont(TDEditor_TD[0], 0);
TextDrawSetProportional(TDEditor_TD[0], 1);
TextDrawSetShadow(TDEditor_TD[0], 0);
TDEditor_TD[1] = TextDrawCreate(116.178619, 167.833358, "Team_deathmatches");
TextDrawLetterSize(TDEditor_TD[1], 0.337217, 3.752501);
TextDrawTextSize(TDEditor_TD[1], 238.008834, 0.000000);
TextDrawAlignment(TDEditor_TD[1], 1);
TextDrawColor(TDEditor_TD[1], -1);
TextDrawUseBox(TDEditor_TD[1], 1);
TextDrawBoxColor(TDEditor_TD[1], 255);
TextDrawSetShadow(TDEditor_TD[1], 0);
TextDrawSetOutline(TDEditor_TD[1], 0);
TextDrawBackgroundColor(TDEditor_TD[1], 255);
TextDrawFont(TDEditor_TD[1], 3);
TextDrawSetProportional(TDEditor_TD[1], 1);
TextDrawSetShadow(TDEditor_TD[1], 0);
TextDrawSetSelectable(TDEditor_TD[1], true);
TDEditor_TD[2] = TextDrawCreate(248.770111, 167.833358, "Normal_Deathmatches");
TextDrawLetterSize(TDEditor_TD[2], 0.338622, 3.729168);
TextDrawTextSize(TDEditor_TD[2], 379.802612, 0.000000);
TextDrawAlignment(TDEditor_TD[2], 1);
TextDrawColor(TDEditor_TD[2], -1);
TextDrawUseBox(TDEditor_TD[2], 1);
TextDrawBoxColor(TDEditor_TD[2], 255);
TextDrawSetShadow(TDEditor_TD[2], 0);
TextDrawSetOutline(TDEditor_TD[2], 0);
TextDrawBackgroundColor(TDEditor_TD[2], 255);
TextDrawFont(TDEditor_TD[2], 3);
TextDrawSetProportional(TDEditor_TD[2], 1);
TextDrawSetShadow(TDEditor_TD[2], 0);
TDEditor_TD[3] = TextDrawCreate(389.795166, 167.833267, "Airplane_Deathmatches");
TextDrawLetterSize(TDEditor_TD[3], 0.320351, 3.775835);
TextDrawTextSize(TDEditor_TD[3], 518.484924, 0.000000);
TextDrawAlignment(TDEditor_TD[3], 1);
TextDrawColor(TDEditor_TD[3], -1);
TextDrawUseBox(TDEditor_TD[3], 1);
TextDrawBoxColor(TDEditor_TD[3], 255);
TextDrawSetShadow(TDEditor_TD[3], 0);
TextDrawSetOutline(TDEditor_TD[3], 0);
TextDrawBackgroundColor(TDEditor_TD[3], 255);
TextDrawFont(TDEditor_TD[3], 3);
TextDrawSetProportional(TDEditor_TD[3], 1);
TextDrawSetShadow(TDEditor_TD[3], 0);
TextDrawSetSelectable(TDEditor_TD[3], true);
TDEditor_TD[4] = TextDrawCreate(108.213851, 225.583404, "Derby_Deathmatches");
TextDrawLetterSize(TDEditor_TD[4], 0.358770, 3.781668);
TextDrawTextSize(TDEditor_TD[4], 237.371749, 0.000000);
TextDrawAlignment(TDEditor_TD[4], 1);
TextDrawColor(TDEditor_TD[4], -1);
TextDrawUseBox(TDEditor_TD[4], 1);
TextDrawBoxColor(TDEditor_TD[4], 255);
TextDrawSetShadow(TDEditor_TD[4], 0);
TextDrawSetOutline(TDEditor_TD[4], 0);
TextDrawBackgroundColor(TDEditor_TD[4], 255);
TextDrawFont(TDEditor_TD[4], 3);
TextDrawSetProportional(TDEditor_TD[4], 1);
TextDrawSetShadow(TDEditor_TD[4], 0);
TextDrawSetSelectable(TDEditor_TD[4], true);
TDEditor_TD[5] = TextDrawCreate(253.455047, 224.999984, "Gang_war_deathmatches");
TextDrawLetterSize(TDEditor_TD[5], 0.392971, 3.245002);
TextDrawTextSize(TDEditor_TD[5], 419.626464, 0.000000);
TextDrawAlignment(TDEditor_TD[5], 1);
TextDrawColor(TDEditor_TD[5], -1);
TextDrawUseBox(TDEditor_TD[5], 1);
TextDrawBoxColor(TDEditor_TD[5], 255);
TextDrawSetShadow(TDEditor_TD[5], 0);
TextDrawSetOutline(TDEditor_TD[5], 0);
TextDrawBackgroundColor(TDEditor_TD[5], 255);
TextDrawFont(TDEditor_TD[5], 3);
TextDrawSetProportional(TDEditor_TD[5], 1);
TextDrawSetShadow(TDEditor_TD[5], 0);
TextDrawSetSelectable(TDEditor_TD[5], true);
TDEditor_TD[6] = TextDrawCreate(430.088073, 223.250000, "Freeroam");
TextDrawLetterSize(TDEditor_TD[6], 0.648783, 3.174999);
TextDrawTextSize(TDEditor_TD[6], 537.394531, 0.000000);
TextDrawAlignment(TDEditor_TD[6], 1);
TextDrawColor(TDEditor_TD[6], -1);
TextDrawUseBox(TDEditor_TD[6], 1);
TextDrawBoxColor(TDEditor_TD[6], 255);
TextDrawSetShadow(TDEditor_TD[6], 0);
TextDrawSetOutline(TDEditor_TD[6], 0);
TextDrawBackgroundColor(TDEditor_TD[6], 255);
TextDrawFont(TDEditor_TD[6], 3);
TextDrawSetProportional(TDEditor_TD[6], 1);
TextDrawSetShadow(TDEditor_TD[6], 0);
TextDrawSetSelectable(TDEditor_TD[6], true);
TDEditor_TD[7] = TextDrawCreate(148.037994, 285.767517, "Please_select_any_mode_you_want");
TextDrawLetterSize(TDEditor_TD[7], 0.446851, 3.262500);
TextDrawAlignment(TDEditor_TD[7], 1);
TextDrawColor(TDEditor_TD[7], -1);
TextDrawSetShadow(TDEditor_TD[7], 0);
TextDrawSetOutline(TDEditor_TD[7], 0);
TextDrawBackgroundColor(TDEditor_TD[7], 255);
TextDrawFont(TDEditor_TD[7], 2);
TextDrawSetProportional(TDEditor_TD[7], 1);
TextDrawSetShadow(TDEditor_TD[7], 0);
//And this added after the login and registration
TextDrawShowForPlayer(playerid,TDEditor_TD[0]);
TextDrawShowForPlayer(playerid,TDEditor_TD[1]);
TextDrawShowForPlayer(playerid,TDEditor_TD[2]);
TextDrawShowForPlayer(playerid,TDEditor_TD[3]);
TextDrawShowForPlayer(playerid,TDEditor_TD[4]);
TextDrawShowForPlayer(playerid,TDEditor_TD[5]);
TextDrawShowForPlayer(playerid,TDEditor_TD[6]);
TextDrawShowForPlayer(playerid,TDEditor_TD[7]);
SelectTextDraw(playerid, 0x721650FF);
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(clickedid == TDEditor_TD[6])//i use this for test and its not responding at all..
{
SetPlayerPos(playerid,1998.1221,-2630.8013,13.5469);
CancelSelectTextDraw(playerid);
SendClientMessage(playerid,RED,"TEST");
}
return 1;
}