SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 17/04/2011, 12:59 PM   #1
Anteino
Big Clucker
 
Join Date: Dec 2010
Posts: 138
Reputation: 2
Default Using function keys in string

With
pawn Code:
GameTextForPlayer
you can print the actual key referring to a funtion, like
pawn Code:
GameTextForPlayer(playerid, "Press ~k~~TOGGLE_SUBMISSIONS~ to start submission.", 3000, 4);
will show "Press 2 to start submission" (if controls set to default).

If you use
pawn Code:
SendClientMessage(playerid, COLOR_WHITE, "Press ~k~~TOGGLE_SUBMISSIONS~ to start submission.");
the actual written text will be show and not "Press 2 to start submission." (if controls set to default). As not everyone has their keys set to default I can't say press 2 to start submission because that would cause confusion for players who haven't set their keys to default.

Anyone got a solution?
Anteino is offline  
Old 17/04/2011, 01:02 PM   #2
Vince
Spam Machine
 
Vince's Avatar
 
Join Date: Sep 2007
Location: Belgium
Posts: 10,071
Reputation: 2655
Default Re: Using function keys in string

Only gametext and textdraws support this. I'm running into the same problem myself. :/

120 seconds waiting time, ffs! Again?
__________________
Vince is offline  
Old 17/04/2011, 01:16 PM   #3
Anteino
Big Clucker
 
Join Date: Dec 2010
Posts: 138
Reputation: 2
Default Re: Using function keys in string

Quote:
Originally Posted by Vince View Post
Only gametext and textdraws support this. I'm running into the same problem myself. :/

120 seconds waiting time, ffs! Again?
Well that sucks :P both xD
Anteino is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
input line too long (after substitutions) - invalid string (possibly non-terminated string) MahmutBey Help Archive 6 10/03/2011 01:39 PM
Loading string from a file and inserting it into other string Ivan_Pantovic Help Archive 0 06/02/2011 07:22 PM
Sending string to function? oliverrud Help Archive 2 21/12/2010 06:21 PM
Function returning string crash pawncc ZecKo Help Archive 2 04/10/2010 03:44 PM
TextDraw String Function -PunisheR- Help Archive 6 21/02/2010 11:02 AM


All times are GMT. The time now is 09:07 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.