PtokaX forum

Archive => Archived 5.0 boards => Request for scripts => Topic started by: Markitos on 12 June, 2005, 10:28:55

Title: Activate right click
Post by: Markitos on 12 June, 2005, 10:28:55
I would like a script with a comand to activate the right click (for users) but if that user is not reg will not have the right click avaible...somthing like dis - (if not reg)"*** Error: Register yourself to enable your RightClick."
Can someone help me?


Respectfully...
Title:
Post by: Dessamator on 12 June, 2005, 10:44:29
yep, since u want to learn how to script,
heres what u need to do,
1. Create a table,
2. Use ur trig(command) to put the users u need in a table .
3. Check if they can have the right clicks on login(NewUserConnected) or OpConnected !
Title:
Post by: Markitos on 12 June, 2005, 11:03:01
QuoteOriginally posted by Dessamator
yep, since u want to learn how to script,
heres what u need to do,
1. Create a table,
2. Use ur trig(command) to put the users u need in a table .
3. Check if they can have the right clicks on login(NewUserConnected) or OpConnected !

Can u give me an example?
Title:
Post by: Dessamator on 12 June, 2005, 12:29:54
yep something like this ::
UsersWithRightclick= {}

function NewUserConnected(user)
if UsersWithRightclick[user.sName]  then
--Send right clicks
end
end

function ChatArrival(user,data)
data=string.sub(data,1,-2)
local s,e,cmd = string.find(data,"%b<>%s+(%S+)" )
if cmd =="!clickson" and user.bRegistered  then
UsersWithRightclick[user.sName] = 1
-- Send right clicks
-- Send msg
         elseif cmd =="!clicksoff" then
                   UsersWithRightclick[user.sName] = 0
-- Remove right clicks
-- Send msg
elseif not user.bRegistered then
-- msg to unreg users here
         
end
end