19.07.2014, 01:42
Tф a 2 hrs tentando e nгo consigo.
nгo tem como clicar na textdraw ! elas sгo criadas, mais n da pra clicar nelas !
pawn Код:
OnPlayerSpawn(playerid)
OpA[playerid] = TextDrawCreate(498.000000, 180.000000, "Fuzileiro");
TextDrawBackgroundColor(OpA[playerid], 255);
TextDrawFont(OpA[playerid], 3);
TextDrawLetterSize(OpA[playerid], 0.569999, 1.400000);
TextDrawColor(OpA[playerid], -1);
TextDrawSetOutline(OpA[playerid], 1);
TextDrawSetProportional(OpA[playerid], 1);
OpB[playerid] = TextDrawCreate(498.000000, 215.000000, "Medico");
TextDrawBackgroundColor(OpB[playerid], 255);
TextDrawFont(OpB[playerid], 3);
TextDrawLetterSize(OpB[playerid], 0.569999, 1.400000);
TextDrawColor(OpB[playerid], -1);
TextDrawSetOutline(OpB[playerid], 1);
TextDrawSetProportional(OpB[playerid], 1);
OpC[playerid] = TextDrawCreate(498.000000, 197.000000, "Engenheiro");
TextDrawBackgroundColor(OpC[playerid], 255);
TextDrawFont(OpC[playerid], 3);
TextDrawLetterSize(OpC[playerid], 0.569999, 1.400000);
TextDrawColor(OpC[playerid], -1);
TextDrawSetOutline(OpC[playerid], 1);
TextDrawSetProportional(OpC[playerid], 1);
OpD[playerid] = TextDrawCreate(498.000000, 231.000000, "Sniper");
TextDrawBackgroundColor(OpD[playerid], 255);
TextDrawFont(OpD[playerid], 3);
TextDrawLetterSize(OpD[playerid], 0.569999, 1.400000);
TextDrawColor(OpD[playerid], -1);
TextDrawSetOutline(OpD[playerid], 1);
TextDrawSetProportional(OpD[playerid], 1);
TextDrawShowForPlayer(playerid, OpA[playerid]);
TextDrawShowForPlayer(playerid, OpB[playerid]);
TextDrawShowForPlayer(playerid, OpC[playerid]);
TextDrawShowForPlayer(playerid, OpD[playerid]);
pawn Код:
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
if(playertextid == PlayerText:OpA[playerid])
{
WF[playerid][pClass] = 1;
Nome_Classe[playerid] = "Fuzileiro";
SpawnPlayer(playerid);
SendClientMessage(playerid, Branco, "Vocк escolheu a classe Fuzileiro e ganhou seus devidos equipamentos");
CancelSelectTextDraw(playerid);
TextDrawHideForPlayer(playerid, OpA[playerid]);
}
if(playertextid == PlayerText:OpB[playerid])
{
WF[playerid][pClass] = 2;
Nome_Classe[playerid] = "Medico";
SpawnPlayer(playerid);
SendClientMessage(playerid, Branco, "Vocк escolheu a classe Medico e ganhou seus devidos equipamentos");
CancelSelectTextDraw(playerid);
TextDrawHideForPlayer(playerid, OpB[playerid]);
}
if(playertextid == PlayerText:OpC[playerid])
{
WF[playerid][pClass] = 3;
Nome_Classe[playerid] = "Engenheiro";
SpawnPlayer(playerid);
SendClientMessage(playerid, Branco, "Vocк escolheu a classe Engenheiro e ganhou seus devidos equipamentos");
CancelSelectTextDraw(playerid);
TextDrawHideForPlayer(playerid, OpC[playerid]);
}
if(playertextid == PlayerText:OpD[playerid])
{
WF[playerid][pClass] = 4;
Nome_Classe[playerid] = "Sniper";
SpawnPlayer(playerid);
SendClientMessage(playerid, Branco, "Vocк escolheu a classe Sniper e ganhou seus devidos equipamentos");
CancelSelectTextDraw(playerid);
TextDrawHideForPlayer(playerid, OpD[playerid]);
}
return 1;
}