Key show on 3D
#1

Hey.. I want that the text will be like:
Press on KEY_SPRINT to go inside..
but with 3D... and I dont have any idea how to make it..
here's an 3d example.. how should I change it?

Create3DTextLabel("/enter\nto go inside ", COLOR_YELLOW2,1207.5046,-1439.0778,13.3828+0.5,10.0, 0);


Maybe?

Create3DTextLabel(KEY_SPRINT\nto go inside ", COLOR_YELLOW2,1207.5046,-1439.0778,13.3828+0.5,10.0, 0);

Thanks for help




EDITT +++++++ what's wrong in it?::

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if((newkeys & (KEY_SPRINT)) == (KEY_SPRINT))
    {
        return OnPlayerCommandText(playerid, "/enter");
    }
    if((newkeys & (KEY_SPRINT)) == (KEY_SPRINT))
    {
        return OnPlayerCommandText(playerid, "/exit");
    }
    return 1;
}
Reply
#2

pawn Код:
Create3DTextLabel(~k~~KEY_SPRINT~\nto go inside ", COLOR_YELLOW2,1207.5046,-1439.0778,13.3828+0.5,10.0, 0);
Reply
#3

Sorry but not working ;/
Reply
#4

Refer to this article for the ~k~ constants. They are not the same as the key definitions.

For the sprint key, it is:
~k~~PED_SPRINT~ (on foot)
k~~VEHICLE_ACCELERATE~ (in vehicle)
Reply
#5

Read before you reply... I want it for 3D text.. I know about SAMP wiki... you dont need to move me to there.. since its not help me.. I need that it will see at the 3D text..
thanks..

and btw.. even PED_SPRINT not working..
Reply
#6

I think I showed you a pretty damn obvious way of doing it. That's how ~k~ works, it doesn't use the actual key definition, but the definitions listed besides it in the wiki page I linked you to. Instead of starting to shout, next time, use your brain a little and think what's been practically fed to you.

I can even give you a working code:
pawn Код:
Create3DTextLabel("Press ~k~~PED_SPRINT~ to go inside!", COLOR_YELLOW2,1207.5046,-1439.0778,13.3828+0.5,10.0, 0);
Reply
#7

Hard to read? already said its not working..
Reply
#8


"Press ~k~~PED_SPRINT~ to enter!"
Reply
#9

Well...

Reply
#10

There, we have the reason. You're using 0.3c.

And the code you first posted didn't use ~k~~PED_SPRINT~ so there's no reason to get aggressive just because I'm referring you to the right implementation!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)