09.07.2014, 13:56
Hi all.
I have a problem with clickable textdraws...
The mouse for clicking appears, but when I click the textdraw, the color doesn't change, and nothing happens...
Here's the code!
Thank you in advance!!
I have a problem with clickable textdraws...
The mouse for clicking appears, but when I click the textdraw, the color doesn't change, and nothing happens...
Here's the code!
pawn Код:
//Under OnGameModeInit
Coloriauto0 = TextDrawCreate(77.000000, 215.000000, "<<");
TextDrawBackgroundColor(Coloriauto0, 255);
TextDrawFont(Coloriauto0, 1);
TextDrawLetterSize(Coloriauto0, 0.500000, 1.000000);
TextDrawColor(Coloriauto0, -1);
TextDrawSetOutline(Coloriauto0, 0);
TextDrawSetProportional(Coloriauto0, 1);
TextDrawSetShadow(Coloriauto0, 1);
TextDrawTextSize(Coloriauto0, 101.000000, 0.000000);
TextDrawSetSelectable(Text:Coloriauto0, 1);
Coloriauto1 = TextDrawCreate(517.000000, 215.000000, ">>");
TextDrawBackgroundColor(Coloriauto1, 255);
TextDrawFont(Coloriauto1, 1);
TextDrawLetterSize(Coloriauto1, 0.500000, 1.000000);
TextDrawColor(Coloriauto1, -1);
TextDrawSetOutline(Coloriauto1, 0);
TextDrawSetProportional(Coloriauto1, 1);
TextDrawSetShadow(Coloriauto1, 1);
TextDrawTextSize(Coloriauto1, 541.000000, 0.000000);
TextDrawSetSelectable(Text:Coloriauto1, 1);
Coloriauto2 = TextDrawCreate(299.000000, 370.000000, "Fine");
TextDrawBackgroundColor(Coloriauto2, 16711730);
TextDrawFont(Coloriauto2, 1);
TextDrawLetterSize(Coloriauto2, 0.500000, 1.499999);
TextDrawColor(Coloriauto2, -1);
TextDrawSetOutline(Coloriauto2, 1);
TextDrawSetProportional(Coloriauto2, 1);
TextDrawTextSize(Coloriauto2, 335.000000, 0.000000);
TextDrawSetSelectable(Text:Coloriauto2, 1);
//On TOP
new Text:Coloriauto0;
new Text:Coloriauto1;
new Text:Coloriauto2;
//The code
if(dialogid == 9001)
{
new i = TempCarID[playerid];
new string[256];
if(response)
{
if(PlayerInfo[playerid][pCash] >= CarInfo[i][CarPrice]) // 400k
{
if(PlayerInfo[playerid][PlayerVehicleModel1] == 0)
{
ResetPlayerVehicleEx(playerid, 1);
PlayerInfo[playerid][pCash] -= CarInfo[i][CarPrice];
PlayerInfo[playerid][PlayerVehiclePosX1] = CarInfo[i][CarSpawnX];
PlayerInfo[playerid][PlayerVehiclePosY1] = CarInfo[i][CarSpawnY];
PlayerInfo[playerid][PlayerVehiclePosZ1] = CarInfo[i][CarSpawnZ];
PlayerInfo[playerid][PlayerVehicleFacing1] = CarInfo[i][CarSpawnF];
PlayerInfo[playerid][PlayerVehicleModel1] = CarInfo[i][CarModel];
PlayerInfo[playerid][pPlayerVehicle1Color] = CarInfo[i][CarColor];
PlayerInfo[playerid][pPlayerVehicle1Color2] = CarInfo[i][CarColor2];
OnPlayerSave(playerid);
RemovePlayerFromVehicle(playerid);
CreatePlayerVehicle(playerid, 1);
TempCarID[playerid] = 0;
format(string,sizeof(string),"{FFFFFF}Congratulazioni per l'acquisto di una {FFF1AF}%s!{FFFFFF} Parcheggiala e compra un antifurto in un qualsiasi negozio di antifurti.",vehName[PlayerInfo[playerid][PlayerVehicleModel1]-400]);
SendClientMessage(playerid,COLOR_YELLOW,string);
SendClientMessage(playerid,COLOR_WHITE, "{FFFFFF}Adesso seleziona il {FFF1AF}colore{FFFFFF} che desideri.");
SelectTextDraw(playerid, 0xC8C8C8C8);
TextDrawShowForPlayer(playerid, Coloriauto0);
TextDrawShowForPlayer(playerid, Coloriauto1);
TextDrawShowForPlayer(playerid, Coloriauto2);
[...]
Thank you in advance!!