mint3d Posted August 25, 2014 Share Posted August 25, 2014 Ok so I need help I made this script for roleplay but it only works when the script is started can anyone help me ? What could I use instead ? local sx, sy = guiGetScreenSize() local scrSrc = dxCreateScreenSource(sx, sy) local shaderFX = dxCreateShader("tinted_windows.fx", 1, 200, true) function skins() for keys, player in ipairs(getElementsByType("player")) do if ( getPlayerName(player) == "Jordan_Green" ) then --local shader, tec = dxCreateShader ( "texreplace.fx" ) local shader, tec = dxCreateShader("texreplace.fx", 2, 0, true, "ped") local tex = dxCreateTexture ( "textures/swmyri.png") engineApplyShaderToWorldTexture ( shader, "swmyri", player ) dxSetShaderValue ( shader, "gTexture", tex ) end end end addEvent("legitimateResponceRecived", true) addEventHandler("legitimateResponceRecived", getRootElement(), skins) function startTheRes() triggerServerEvent("tintDemSkins", getLocalPlayer()) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), startTheRes) addEventHandler("tintSkins", getRootElement(), startTheRes) Link to comment
lcd12321 Posted August 25, 2014 Share Posted August 25, 2014 use event onclientrender Link to comment
Et-win Posted August 25, 2014 Share Posted August 25, 2014 use event onclientrender I hope you don't mean to put that on function 'skins'....... Link to comment
mint3d Posted August 25, 2014 Author Share Posted August 25, 2014 I need help so it sets a timer or something cause I don't want to restart the resource everytime I join... Link to comment
Bonsai Posted August 25, 2014 Share Posted August 25, 2014 The resource does restart every time you join, at least the clientside. Link to comment
mint3d Posted August 26, 2014 Author Share Posted August 26, 2014 It doesn't work unless I restart the resource... Link to comment
mint3d Posted August 29, 2014 Author Share Posted August 29, 2014 Someone please help me... Link to comment
Controlled Posted August 30, 2014 Share Posted August 30, 2014 Don't know wtf your talking about. Link to comment
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