Key show on 3D -
Qur - 24.11.2011
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;
}
Re: Key show on 3D -
Pharrel - 24.11.2011
pawn Код:
Create3DTextLabel(~k~~KEY_SPRINT~\nto go inside ", COLOR_YELLOW2,1207.5046,-1439.0778,13.3828+0.5,10.0, 0);
Re: Key show on 3D -
Qur - 24.11.2011
Sorry but not working ;/
Re: Key show on 3D -
AndreT - 24.11.2011
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)
Re: Key show on 3D -
Qur - 24.11.2011
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..
Re: Key show on 3D -
AndreT - 24.11.2011
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);
Re: Key show on 3D -
Qur - 24.11.2011
Hard to read? already said its not working..
Re: Key show on 3D -
AndreT - 24.11.2011

"Press ~k~~PED_SPRINT~ to enter!"
Re: Key show on 3D -
Qur - 24.11.2011
Well...
Re: Key show on 3D -
AndreT - 24.11.2011
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!