Deniel Posted February 12, 2020 Posted February 12, 2020 Então galera, tipo eu to com uma dúvida aqui, o createObject é possível colocar ele para que outros jogadores vejam o mesmo? por exemplo um celular na mão de outro player. e isso interfere muito no desempenho?
Deniel Posted February 13, 2020 Author Posted February 13, 2020 11 hours ago, Deniel said: Então galera, tipo eu to com uma dúvida aqui, o createObject é possível colocar ele para que outros jogadores vejam o mesmo? por exemplo um celular na mão de outro player. e isso interfere muito no desempenho? local phone = {} phone = createObject(330, 0, 0, 0, 0, 0, 0) por exemplo assim
Other Languages Moderators Lord Henry Posted February 13, 2020 Other Languages Moderators Posted February 13, 2020 Sim. Crie o objeto no lado server. 1
Deniel Posted February 13, 2020 Author Posted February 13, 2020 4 hours ago, Lord Henry said: Sim. Crie o objeto no lado server. local animTimer = {} local phone = {} function animacao_open_phone ( source ) setPedAnimation (source, "ped","phone_in", 1000, false, false, false, true) setPedAnimationProgress(source, "phone_in", 0.8) phone = createObject(330, 0, 0, 0, 0, 0, 0) animTimer[source] = setTimer(function ( ) setPedAnimationProgress(source, "phone_in", 0.8) end, 500, 0) end addEvent("openPhone", true) addEventHandler("openPhone", getRootElement(), animacao_open_phone) function desativar_animacao ( source ) if isTimer(animTimer[source]) then killTimer(animTimer[source]) end setPedAnimation ( source , "ped", "phone_out", 50, false, false, false, false) end addEvent("closePhone", true) addEventHandler("closePhone", getRootElement(), desativar_animacao) por exemplo assim, porém ainda não aparece.
Other Languages Moderators Lord Henry Posted February 13, 2020 Other Languages Moderators Posted February 13, 2020 Você criou o objeto na posição 0, 0, 0. Essa posição fica no meio do mapa, dentro do chão. Dai não vai conseguir ver mesmo.
Deniel Posted February 14, 2020 Author Posted February 14, 2020 6 hours ago, Lord Henry said: Você criou o objeto na posição 0, 0, 0. Essa posição fica no meio do mapa, dentro do chão. Dai não vai conseguir ver mesmo. devo utilizar então getElementPosition
Other Languages Moderators Lord Henry Posted February 14, 2020 Other Languages Moderators Posted February 14, 2020 Só colocar a posição certa no createObject ué. Troca aqueles zeros pela coordenada certa.
Deniel Posted February 15, 2020 Author Posted February 15, 2020 On 14/02/2020 at 15:41, Lord Henry said: Só colocar a posição certa no createObject ué. Troca aqueles zeros pela coordenada certa. ainda não entendi kkk, como vou fazer pra pegar a posição do player em si?
Other Languages Moderators Lord Henry Posted February 16, 2020 Other Languages Moderators Posted February 16, 2020 (edited) Ah, dai sim precisa de um GetElementPosition Edited February 16, 2020 by Lord Henry
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now