-
Posts
1,646 -
Joined
-
Last visited
Everything posted by CapY
-
Is there any way to import 1st skin on the server ?
-
Try with these functions: setPlayerTeam -- Sets the player team createTeam --Creates a team isObjectInACLGroup --Check is user in Admin group. onPlayerLogin --You must use this event to move a player in a team.
-
Comments always start with this "--" So this is WRONG llamar la función cuando este active el nitro. CORRECT --llamar la función cuando este active el nitro. Add -- on your other comments too and post your debug errors.
-
Okay i cutted it to a Client side only , the problem was in that when i restarted some resource a rule GUI was displayed always, so i changed handlers from getRootElement() to a getResourceRootElement(getThisResource()). So cams are not switchable and they don't redirect to a player. --Client local resourceRoot = getResourceRootElement(getThisResource()) local matrixCams = { {1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316,0,180},--Vinewood Sign {1614.837, -1301.275, 138.188, 200, 400, 102,0,180}, --LS {-1856.736, 807.699, 115.546, 300, 250,99.98, 70, 90}, --SF } local index = 1 function switchMatrixCams() local positionX,positionY,positionZ,lookAtX,lookAtY,lookAtZ, roll, fov = unpack(matrixCams[index]) if getCameraMatrix() then setCameraMatrix(positionX,positionY,positionZ,lookAtX,lookAtY,lookAtZ, roll, fov) camTimer = setTimer(switchMatrixCams,10000,1) index = index + 1 if index > #matrixCams then index = 1 end end end function stopCamSwitch () killTimer (camTimer) cancelEvent () end addEventHandler("onClientResourceStart",getRootElement(),stopCamSwitch) addEventHandler("onClientResourceStart",resourceRoot, function() -- set the player's camera to a fixed position, looking at a fixed point switchMatrixCams ( ) addEventHandler("onClientGUIClick", Button1[1],camTarget, false ) addEventHandler("onClientGUIClick", Btn2[2],camTarget, false ) addEventHandler("onClientGUIClick", Btn3[3],camTarget, false ) addEventHandler ( "onClientGUIClick", Button1[1], stopCamSwitch, false) addEventHandler ( "onClientGUIClick", Btn2[2], stopCamSwitch, false) addEventHandler ( "onClientGUIClick", Btn3[3], stopCamSwitch, false) end ) addEventHandler("onClientResourceStart",resourceRoot, function() GUIEditor_Button = {} GUIEditor_Window = {} GUIEditor_Memo = {} GUIEditor_Window[ 1 ] = guiCreateWindow(0.2805,0.2139,0.4172,0.5713,"Rules ",true) guiSetAlpha(GUIEditor_Window[1],0.80000001192093) GUIEditor_Memo[1] = guiCreateMemo(0.03,0.065,0.9382,0.8376," Here is a list of our rules, respect them.\n\n\n1. Do NOT use any kinds of hacks and cheats. \n\n2. Do NOT argue with staff, our is last.\n\n3. Respect other players , especially members.\n\n4. Dont fight with others.\n\n5. Dont use any outgame modified handlings ( use handling editor for that, more info on F9 ) \n\n6. Never ask for membership, we will ask you .\n\n7. Dont bother staff .\n\n8. Have a bit of experience .\n\n9. If something you don't understand , just read help on F9 .\n\n10. Don't spam vehicles , dont RAM others.\n\n\nAbove all , have fun !\n\n\n\n\nNote: Every rule break can result as kick / ban or permaban.",true,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(0.3951,0.935,0.2397,0.0496,"Accept !",true,GUIEditor_Window[1]) showCursor(true) guiSetVisible(GUIEditor_Window[1],true) addEventHandler("onClientGUIClick",GUIEditor_Button[1], function() guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(Window[ 1 ],true) guiMemoSetReadOnly (GUIEditor_Memo[1], true) guiWindowSetSizable(GUIEditor_Window[1],false) guiWindowSetMovable(GUIEditor_Window[1],false) end,false) end function camTarget() setCameraTarget(localPlayer) end ) Can you explain me what is now wrong ?
-
@BinSlayer i just tryied to trigger a GUI and matrix camera onPlayerJoin, but then i got these errors. EDIT:Can i trigger more events with just ONE function ?
-
@JR10 and what he will play , if he turns off Freeroam ?
-
You need to have a router. You need to have ports open. You can see it in your console or ingame in Local tab , just scroll to the right. Yay ! 500th post
-
What's your server IP ?
-
AFAIK chat supports colors automatically or try to RUN "playercolors" resource on Admin panel.
-
EDIT:You don't see ruleOnJoin because this is not the full script , this is just a part of it . Well problem is in that , that camera didn't return to a player , but i have a function of it function camTarget() setCameraTarget(localPlayer) end And the gui don't want to hide , but event is added. EDIT2:Without that 4 events GUI will NOT be displayed.
-
After 2 hours of trying and figuring out what is wrong , i didn't succed . On debug it says events are not added , like : Server triggered clientside event , but event is not added on a client side, but it's added , i don't know what is wrong there. --Client function MarkerHit() -- define MarkerHit function for the handler setElementPosition ( getLocalPlayer(), 2143, -2580, 14 ) guiSetVisible ( Window [ 1 ] , false ) showCursor ( false ) end addEvent("marker1", true) addEventHandler("marker1", getRootElement(), MarkerHit) function MarkerHit2() -- define MarkerHit function for the handler setElementPosition ( getLocalPlayer(), -1432, -126, 26 ) guiSetVisible ( Window [ 1 ] , false ) showCursor ( false ) end addEvent("marker2", true) addEventHandler("marker2", getRootElement(), MarkerHit2) function MarkerHit3() -- define MarkerHit function for the handler setElementPosition ( getLocalPlayer(), 1597,1449,34 ) guiSetVisible ( Window [ 1 ] , false ) showCursor ( false ) end addEvent("marker3", true) addEventHandler("marker3", getRootElement(), MarkerHit3) --Server function serverRuleGUI() triggerClientEvent("ruleOnJoin", getRootElement(), ruleGUI) end function serverMarker() triggerClientEvent("marker1", getRootElement(), MarkerHit) end function serverMarker2() triggerClientEvent("marker2", getRootElement(), MarkerHit2) end function serverMarker3() triggerClientEvent("marker3", getRootElement(), MarkerHit3) end addEventHandler("onPlayerJoin", getRootElement(), serverMarker) addEventHandler("onPlayerJoin", getRootElement(), serverMarker2) addEventHandler("onPlayerJoin", getRootElement(), serverMarker3) addEventHandler("onPlayerJoin", getRootElement(), serverRuleGUI) Anybody can explain what is wrong ?
-
That's reported already Tank07
-
Wanna know ? Check a documentation which i posted.
-
Lool i'll ask my friend, if he can test it on Win 8 with he's epic gaming rig
-
Roofl in this case that won't help and i don't this thing anymore.
-
If you watched Documentation which i posted then you know how is it . FAILDOWS lool