12.10.2016, 03:11
Information
You need to use format to replace the string formatter with the distance you have provided. putting "string" means nothing to the compiler and will interpret it as just the text "string". You need to replace "string" with the value for distance.
Where you have used format to make string have the value for distance, you need to instead put the dialog content in there and at the end use a format specifier to replace that with distance as I have done for you below
You need to use format to replace the string formatter with the distance you have provided. putting "string" means nothing to the compiler and will interpret it as just the text "string". You need to replace "string" with the value for distance.
Where you have used format to make string have the value for distance, you need to instead put the dialog content in there and at the end use a format specifier to replace that with distance as I have done for you below
Код:
CMD:findjob( playerid, params[] ) { new string[ 128 ] // increase this to allow for all your text to fit ; format( string, sizeof( string ), "Job\tLocation\tDistance\n \ Pizza Boy\tSan Fierro\t%.02f", GetPlayerDistanceFromPoint( playerid, -1720.962646, 1364.456176, 7.187500 ) ); return ShowPlayerDialog( playerid, DIALOG_FINDJOB, DIALOG_STYLE_TABLIST_HEADERS, "FINDJOB", string, "Select", "Cancel" ); }