Jump to content

Trigger problem #2


MatXpl

Recommended Posts

Posted
function saveEqS () 
triggerClientEvent(source, "savePlayerEq") 
end 
addEventHandler ( "onPlayerQuit", getRootElement(), saveEqS ) 

It do nothing...

Posted

You should attach event to some element (for example root or source, like triggerClientEvent(source, "savePlayerEq",root)), and also, how you want trigger event to player who leave from server?

Posted

show your client so we can help you when we know what you are trying to do, also there are no such functions client to save account data.

Posted

i want save my gridlist to xml

  
function savePlayerEq2() 
for i = 0,  guiGridListGetRowCount ( eq )  do 
outputChatBox(i) 
                local p1 = guiGridListGetItemText ( eq, i, 1 )   
outputChatBox(p1) 
                local p2 = guiGridListGetItemText ( eq, i, 2 )  --typ 
                local p3 = guiGridListGetItemText ( eq, i, 3 )   
                local p4 = guiGridListGetItemText ( eq, i, 4 )   
                local p5 = guiGridListGetItemText ( eq, i, 5 )   
                local p6 = guiGridListGetItemText ( eq, i, 6 )   
                local p7 = guiGridListGetItemText ( eq, i, 7 )   
if not ( p1 == "" ) then 
triggerServerEvent ( "saveS", getLocalPlayer(), p1, p2, p3, p4, p5, p6, p7, getLocalPlayer() ) 
end 
end 
end 
  

Posted

any things?

addEventHandler( "onClientPlayerQuit", getRootElement(), onQuitGame )

it must be a getRootElement ?

why not getLocalPlayer() ??

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...