OnPlayerClickPlayerTextDraw
#1

hello,

I have problems with my code, no errors when I compile, but my code does not work in games here are my codes:

textdraw:

pawn Код:
PlayerData[playerid][pTextdraws][93] = CreatePlayerTextDraw(playerid,152.799972, 166.506622, "~>~");
    PlayerTextDrawLetterSize(playerid, PlayerData[playerid][pTextdraws][93], 0.449999, 1.600000);
    PlayerTextDrawAlignment(playerid, PlayerData[playerid][pTextdraws][93], 1);
    PlayerTextDrawColor(playerid, PlayerData[playerid][pTextdraws][93], -1);
    PlayerTextDrawSetShadow(playerid, PlayerData[playerid][pTextdraws][93], 0);
    PlayerTextDrawSetOutline(playerid, PlayerData[playerid][pTextdraws][93], 1);
    PlayerTextDrawBackgroundColor(playerid, PlayerData[playerid][pTextdraws][93], 51);
    PlayerTextDrawFont(playerid, PlayerData[playerid][pTextdraws][93], 1);
    PlayerTextDrawSetProportional(playerid, PlayerData[playerid][pTextdraws][93], 1);
    PlayerTextDrawSetSelectable(playerid, PlayerData[playerid][pTextdraws][93], 1);


    PlayerData[playerid][pTextdraws][106] = CreatePlayerTextDraw(playerid,77.599960, 167.253295, "Sexe");
    PlayerTextDrawLetterSize(playerid, PlayerData[playerid][pTextdraws][106], 0.334798, 1.555199);
    PlayerTextDrawAlignment(playerid, PlayerData[playerid][pTextdraws][106], 1);
    PlayerTextDrawColor(playerid, PlayerData[playerid][pTextdraws][106], -1);
    PlayerTextDrawSetShadow(playerid, PlayerData[playerid][pTextdraws][106], 0);
    PlayerTextDrawSetOutline(playerid, PlayerData[playerid][pTextdraws][106], 1);
    PlayerTextDrawBackgroundColor(playerid, PlayerData[playerid][pTextdraws][106], 51);
    PlayerTextDrawFont(playerid, PlayerData[playerid][pTextdraws][106], 1);
    PlayerTextDrawSetProportional(playerid, PlayerData[playerid][pTextdraws][106], 1);
code:

pawn Код:
if (playertextid == PlayerData[playerid][pTextdraws][93]) // Homme ou femme
    {
        switch (p_inscription[playerid])
        {
            case 0: {
                PlayerTextDrawSetString(playerid, PlayerData[playerid][pTextdraws][106], "~r~Sexe:~w~ Homme");
            }
            case 1:{
                PlayerTextDrawSetString(playerid, PlayerData[playerid][pTextdraws][106], "~r~Sexe:~w~ Femme");
            }
        }
        PlayerData[playerid][pGender] = p_inscription[playerid] + 1;
        PlayerData[playerid][pSkin] = (p_inscription[playerid]) ? (233) : (98);
        SetPlayerSkin(playerid, PlayerData[playerid][pSkin]);
    }
I am so sorry for the French spelling, and I thank the members who help me.

kind regards,
Drek.
Reply
#2

Up please !
Reply
#3

What exactly does it NOT do ?

does it not click or does it not show at all ?
Reply
#4

If textdraw appears fine, but when you click on this one, nothing is happening enfкte. I do not know if the code is wrong or if there is a problem with the textdraw.
Reply
#5

Up please....
Reply
#6

I dont see any selectable options in your code so here you are;

https://sampwiki.blast.hk/wiki/TextDrawSetSelectable
https://sampwiki.blast.hk/wiki/OnPlayerClickTextDraw

good luck
Reply
#7

Not my code is here:

pawn Код:
if (playertextid == PlayerData[playerid][pTextdraws][96])
    {
        ChooseSkin(playerid, true); // 1 а droite
    }
and when I'm just, I see very well my message :

pawn Код:
if (playertextid == PlayerData[playerid][pTextdraws][96])
    {
        SendClientMessage(playerid, COLOR_LIGHTRED, "96");
    }
Reply
#8

How about you post the whole callback and not just the statements?
Reply
#9

You didn't turn on usebox nor set the textsize.
Reply
#10

Quote:
Originally Posted by AIped
Посмотреть сообщение
I dont see any selectable options in your code so here you are;

https://sampwiki.blast.hk/wiki/TextDrawSetSelectable
https://sampwiki.blast.hk/wiki/OnPlayerClickTextDraw

good luck
thats what i said XD
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)