Author Topic: GetItemByName()  (Read 1577 times)

0 Members and 1 Guest are viewing this topic.

Offline [ES]latinmusic

  • Triple Ace
  • **
  • Posts: 236
  • Karma: +1/-0
GetItemByName()
« on: 07 November, 2003, 14:55:03 »
Scripting part are driving me crazy, please help me here:
1.- What do i supposse this: GetItemByName() does?.
2.- If i put the following line:
temp = GetItemByName(arg)
and if arg have the string value test
what is the exact value i obtain in var: temp ?.
Or i doing something really wrong or i'm an idiot, probably the second :(

PtokaX forum

GetItemByName()
« on: 07 November, 2003, 14:55:03 »

Offline Guibs

  • Double Ace
  • *
  • Posts: 142
  • Karma: +3/-0
(No subject)
« Reply #1 on: 07 November, 2003, 15:28:37 »
Hi there,,

GetItemByName() < check if a string can be converted as an 'user object'

temp = GetItemByName(arg) < so, check if 'arg' is connected,...

if your arg = 'test', & if 1 user called 'test' is connected, then the script will get the user object 'temp'.
-----
Code: [Select]
temp = GetItemByName(arg)
if temp ~= nil then
SendToOps("Log",temp.sName.." is connected...., & his Ip is: "..temp.sIP.." :)")
else
SendToOps("Log",arg.." is not connected.... :s")
end
-----
So,, as 'temp' is connected, you can use those properties with him:
-----
sName
bOperator
sIP
iVersion
sMyInfoString
iProfile
-----
See the scripting.txt file for more help about,,
Hoping it helps,, :)

l8tr, ;)
-- Please,... don\'t ask help in Pm,...Forums are made for that, to help everyone & my Inbox pm will be safe,... Thks,,  :))  --
CB forum     /     CB Home page

Offline [ES]latinmusic

  • Triple Ace
  • **
  • Posts: 236
  • Karma: +1/-0
(No subject)
« Reply #2 on: 07 November, 2003, 16:59:03 »
Yes it help a lot althougth does not fix my problem, thanks guibs  :P

PtokaX forum

(No subject)
« Reply #2 on: 07 November, 2003, 16:59:03 »