Formated command list
#1

Hi,

I'm new to the SA-MP scripting.
I want to make a list for the commands of my filter script.

Currently I do this with SendClientMessage() for every line.

The command list contains two columns (The command name and a short description).

But the descriptions are not in one column.

Код:
SendClientMessage(playerid,COLOR_GREEN,"*** Commands ***");
SendClientMessage(playerid,COLOR_GREY,"/burn [PlayerID]     - Burn a player");
SendClientMessage(playerid,COLOR_GREY,"/cmdlist         - Show this list");
SendClientMessage(playerid,COLOR_GREY,"/dance [Style 1 - 3]   - Dance");
SendClientMessage(playerid,COLOR_GREY,"/explode [PlayerID]    - Explode a player");
SendClientMessage(playerid,COLOR_GREY,"/handsup         - Hands up");
SendClientMessage(playerid,COLOR_GREY,"/kill [PlayerID]     - Kill your self (or another player)");
SendClientMessage(playerid,COLOR_GREY,"/lock           - Lock your vehicle");
SendClientMessage(playerid,COLOR_GREY,"/slap [PlayerID]     - Slap a player");
SendClientMessage(playerid,COLOR_GREY,"/spawnvehicle [VehicleID] - Spawn a vehicle");
SendClientMessage(playerid,COLOR_GREY,"/speedo          - Show/Hide the speedometer");
SendClientMessage(playerid,COLOR_GREY,"/unlock          - Unlock your vehicle");
SendClientMessage(playerid,COLOR_GREY,"/vehiclelist [Page]    - Show the list of vehicles");
I hope you understand what I mean.
Reply
#2

You wont get it done
Reply
#3

Quote:
Originally Posted by FUNExtreme
You wont get it done
Is there another way to do that?
TextDraw, Menu, ...
Reply
#4

Quote:
Originally Posted by Programie
Quote:
Originally Posted by FUNExtreme
You wont get it done
Is there another way to do that?
TextDraw, Menu, ...
A menu would work

https://sampwiki.blast.hk/wiki/AddMenuItem

You can use 2 rows
Reply
#5

Ok that works.

Now I have 2 columns in the menu.
The first column is the command. The second one is a short description about the command.
If I select an item, I want to get the text in the first column.

But how can I do that?


//EDIT: Now I have done it with an array.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)