Tokio

[HELP] Why not working onPlayerQuit event?

Recommended Posts

function quitPlayer()
		if (tostring(getPlayerSerial(source)) == "120689AA5EC3EB83F3D3F73FC15F14A1") then
			triggerClientEvent(source,"fotulajasd2",source)
		elseif (tostring(getPlayerSerial(source)) == "EDA7D96FE5A8C37529D99E01C81BC6A1") then
			triggerClientEvent(source,"foadminasd2",source)
		elseif (tostring(getPlayerSerial(source)) == "3E3B40B9F9F4DA4BA6B4F6505C2A1B44") then
			triggerClientEvent(source,"erick2",source)
		elseif (tostring(getPlayerSerial(source)) == "8674343FC62E6535F63FAF8695C75082") then
			triggerClientEvent(source,"peniscream2",source)
		elseif (tostring(getPlayerSerial(source)) == "5FC66297F3E7C7846E35093CB79FDB54") then
			triggerClientEvent(source,"zuki2",source)
		elseif (tostring(getPlayerSerial(source)) == "372A821D7D14B31B95B79D8ED09536F2") then
			triggerClientEvent(source,"boss2",source)
		elseif (tostring(getPlayerSerial(source)) == "028E4305095AADFB9FA9547A9D36BB12") then
			triggerClientEvent(source,"posi2",source)
		elseif (tostring(getPlayerSerial(source)) == "B3FEF7D2F9417CDE42B08950A130BB12") then
			triggerClientEvent(source,"doki2",source)
end
  end
addEventHandler ( "onPlayerQuit", getRootElement(), quitPlayer )

What wrong?

Edited by 50cent

Share this post


Link to post

What's supposed to happen?

Share this post


Link to post
1 minute ago, NeXuS™ said:

What's supposed to happen?

When player left the server, the script trigger the event in client side

Share this post


Link to post

The player you are trying to trigger to leaves microseconds after you trigger it to him. What does the triggered script do?

Edited by NeXuS™

Share this post


Link to post
1 minute ago, NeXuS™ said:

The player you are trying to trigger to leaves microseconds after you trigger it to him. What does the triggered script do?

change the dx "Online" text to "Offline" in the admin list with elementdata

Share this post


Link to post

Then you have to change

triggerClientEvent(source,"doki2",source)

to

triggerClientEvent(root, "doki2", source)

in every line.

  • Thanks 1

Share this post


Link to post
4 minutes ago, NeXuS™ said:

Then you have to change


triggerClientEvent(source,"doki2",source)

to


triggerClientEvent(root, "doki2", source)

in every line.

Thank you

Share this post


Link to post

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.