• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

I need help with function.

Status
Not open for further replies.

darex11

Own Big Server
Joined
Aug 21, 2007
Messages
219
Reaction score
0
Location
Poland
Hello. I want help in my functions. I want get name: xxx,xxx1,xxx2... and show in text.

PHP:
local config = 
{
["xxx"] = {1000, 1000, 7},        
["xxx1"] =  {2000, 2000, 8},
["xxx2"] =  {3000, 3000, 8},
["xxx3"] =  {4000, 4000, 7}
}

Get name and show:
PHP:
doPlayerSendCancel(cid, "The name is " .. what here write .. ".")
I try:
PHP:
doPlayerSendCancel(cid, "The name is " .. config .. ".")
I realy don't know.
I want to see:
PHP:
The name is xxx.
or
PHP:
The name is xxx1.
...

This text is only example ...
Any help ? I realy want to get name and display.
Rep+ for help !
 
Last edited:
I've not worked with ["xxx"], but if I'd do this then I'd do like this:

PHP:
local xxx = {1000, 1000, 7},        
local xxx1 =  {2000, 2000, 8},
local xxx2 =  {3000, 3000, 8},
local xxx3 =  {4000, 4000, 7}

Then write this:
PHP:
doPlayerSendCancel(cid, "The name is "..xxx..".")

CORRECT ME IF I AM WRONG!
 
I've not worked with ["xxx"], but if I'd do this then I'd do like this:

PHP:
local xxx = {1000, 1000, 7},        
local xxx1 =  {2000, 2000, 8},
local xxx2 =  {3000, 3000, 8},
local xxx3 =  {4000, 4000, 7}

Then write this:
PHP:
doPlayerSendCancel(cid, "The name is "..xxx..".")

CORRECT ME IF I AM WRONG!

This is no possible, becouse xxx is param to talkactions.
My functions:

PHP:
!function xxx 
!function xxx1
!function xxx2

Well I want to display other parametr ( name xxx, xxx1, xxx2 ) in functions:
doPlayerSendCancel(cid, "The name is "..config..".")
and if I write !function xxx display me
PHP:
The name is xxx
and if I write !function xxx1
PHP:
The name is xxx1
 
Status
Not open for further replies.
Back
Top