View Issue Details

IDProjectCategoryView StatusLast Update
0002570Multi Theft Auto : San AndreasScriptingpublic2007-10-07 03:18
ReporterslothmanAssigned ToJax 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Versionblue_sa.r2.a12 
Target VersionFixed in Versionmtasadm_v1.0-dp1 
Summary0002570: onClientPlayerJoin not triggering
Description

simply put: nothing happens when i use this event. Ransom brought it to my attention that the sound bar in stealth wasnt starting on join, after experimenting and doing everything i can to find out why, im now thinking its an mta bug.

Steps To Reproduce

/start mantis2570
/reconnect

TagsNo tags attached.

Activities

Talidan

2007-09-30 13:37

administrator   ~~0005869

surely you should be using resource start for joining players too? onClientPlayerJoin triggers for remote players joining. onClientResourceStart starts when the script is initialised, i.e. on join or on start

slothman

2007-09-30 16:04

updater   ~~0005870

according to the wiki, onClientPlayerJoin only triggers when the local player joins. onClientResourceStart does not trigger when the player joins either.

jbeta

2007-10-01 02:55

updater   ~~0005872

Yes, you should be using onClientResourceStart. If it isn't triggering it may be #2560 or some other related bug related to it.

jbeta

2007-10-01 03:05

updater   ~~0005873

Last edited: 2007-10-01 03:07

Confirmed for the local player: onClientPlayerJoin triggers for all other players.

You can use onClientResourceStart for the local player, leaving this open so devs can decide if it's a bug.

EDIT: Added test resource.

jbeta

2007-10-04 19:16

updater   ~~0005908

Tested outputting source on 1005, debug servers (shouldn't matter), with and without a 2sec timer. The handler was never called.

Could it be that it's being triggered before running resources have started clientside?

[test code (/mantis2570)]
addEventHandler("onClientPlayerJoin",getRootElement(),
function()
setTimer(function() outputChatBox("onClientPlayerJoin triggered from "..getElementType(source).." '"..getPlayerName(source).."'") end,2000,1)
end
)

Jax

2007-10-07 03:17

administrator   ~~0005934

I resolved the other day, but svn was down, should be fixed now.

Issue History

Date Modified Username Field Change