-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
Right, I forgot to change that again.
-
-- client side: GUIEditor = { tab = {}, button = {}, edit = {}, window = {}, gridlist = {}, label = {}, tabpanel = {}, } GUIEditor.window[1] = guiCreateWindow(240, 267, 632, 467, "Hawk|RPG Disc System", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1], false) GUIEditor.tabpanel[1] = guiCreateTabPanel(10, 23, 613, 388, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Disc", GUIEditor.tabpanel[1]) GUIEditor.label[1] = guiCreateLabel(15, 36, 226, 59, "Address:", false, GUIEditor.tab[1]) local font_0 = guiCreateFont(":[Hawk]GuiEditor/fonts/PetitFormalScript.ttf") guiSetFont(GUIEditor.label[1], font_0) guiLabelSetColor(GUIEditor.label[1], 255, 254, 254) GUIEditor.label[2] = guiCreateLabel(15, 95, 226, 59, "Value:", false, GUIEditor.tab[1]) guiSetFont(GUIEditor.label[2], font_0) guiLabelSetColor(GUIEditor.label[2], 255, 254, 254) GUIEditor.label[3] = guiCreateLabel(15, 154, 226, 59, "Owner:", false, GUIEditor.tab[1]) guiSetFont(GUIEditor.label[3], font_0) guiLabelSetColor(GUIEditor.label[3], 255, 254, 254) GUIEditor.button[1] = guiCreateButton(21, 229, 129, 44, "Buy", false, GUIEditor.tab[1]) GUIEditor.button[2] = guiCreateButton(21, 300, 129, 44, "Sell", false, GUIEditor.tab[1]) GUIEditor.tab[2] = guiCreateTab("Garage", GUIEditor.tabpanel[1]) GUIEditor.gridlist[1] = guiCreateGridList(13, 23, 587, 197, false, GUIEditor.tab[2]) guiGridListAddColumn(GUIEditor.gridlist[1], "Names", 0.2) guiGridListAddColumn(GUIEditor.gridlist[1], "Health", 0.2) guiGridListAddColumn(GUIEditor.gridlist[1], "Fuel", 0.2) guiGridListAddColumn(GUIEditor.gridlist[1], "Cost", 0.2) guiGridListAddColumn(GUIEditor.gridlist[1], "Status", 0.2) GUIEditor.button[3] = guiCreateButton(28, 234, 175, 67, "Spawn Vehicle", false, GUIEditor.tab[2]) GUIEditor.button[4] = guiCreateButton(226, 234, 175, 67, "Repair Vehicle", false, GUIEditor.tab[2]) GUIEditor.button[5] = guiCreateButton(420, 234, 175, 67, "Park Vehicle", false, GUIEditor.tab[2]) GUIEditor.tab[3] = guiCreateTab("Weapons", GUIEditor.tabpanel[1]) GUIEditor.gridlist[2] = guiCreateGridList(26, 69, 220, 285, false, GUIEditor.tab[3]) guiGridListAddColumn(GUIEditor.gridlist[2], "Weapon", 0.4) guiGridListAddColumn(GUIEditor.gridlist[2], "Ammo", 0.4) GUIEditor.gridlist[3] = guiCreateGridList(383, 69, 220, 285, false, GUIEditor.tab[3]) guiGridListAddColumn(GUIEditor.gridlist[3], "Weapon", 0.4) guiGridListAddColumn(GUIEditor.gridlist[3], "Ammo", 0.4) GUIEditor.label[4] = guiCreateLabel(63, 48, 219, 42, "Your Weapons", false, GUIEditor.tab[3]) guiSetFont(GUIEditor.label[4], font_0) GUIEditor.label[5] = guiCreateLabel(468, 48, 219, 42, "Storage", false, GUIEditor.tab[3]) guiSetFont(GUIEditor.label[5], font_0) GUIEditor.button[6] = guiCreateButton(262, 118, 103, 55, "--->", false, GUIEditor.tab[3]) GUIEditor.button[7] = guiCreateButton(262, 228, 103, 55, "<---", false, GUIEditor.tab[3]) GUIEditor.edit[1] = guiCreateEdit(264, 180, 101, 43, " ammo ", false, GUIEditor.tab[3]) GUIEditor.button[9] = guiCreateButton(255, 10, 125, 61, "Done", false, GUIEditor.tab[3]) GUIEditor.button[10] = guiCreateButton(32, 419, 187, 39, "Start New Life", false, GUIEditor.window[1]) GUIEditor.button[11] = guiCreateButton(426, 418, 187, 39, "Close", false, GUIEditor.window[1]) function kill3() triggerServerEvent("kill", localPlayer) hide() end addEventHandler("onClientGUIClick", GUIEditor.button[10], kill3, false) function hide() guiSetVisible(GUIEditor.window[1], false) showCursor ( false ) end addEventHandler ( "onClientGUIClick", GUIEditor.button[11], hide, false ) addEvent ("RespawnGUI",true) addEventHandler ("RespawnGUI",root, function ( ) guiSetVisible(GUIEditor.window[1], true) showCursor ( true ) end ) -- server side: function Respawnfunction1() Respawn = createMarker(1565.5197753906,-1634.7216796875,13.55480670929,"cylinder",0.2999, 248, 248, 255, 150 ) cph = createPickup (1565.5197753906,-1634.7216796875,13.55480670929, 3, 1277, 0 ) Respawn2 = createMarker(-2442.1293,753.10,35.17,"cylinder",0.2999, 248, 248, 255, 150 ) cpp = createPickup (-2442.1293,753.10,35.17, 3, 1277, 0 ) end addEventHandler ("onResourceStart",resourceRoot,Respawnfunction1) blip = createBlip ( 1565.5197753906,-1634.7216796875,13.55480670929,35 ) blip2 = createBlip ( -2442.1293,753.10,35.17,35 ) function RespawnGUI(hitElement) if ( source == Respawn or source == Respawn2 ) then triggerClientEvent (hitElement,"RespawnGUI",getRootElement()) end end addEventHandler ("onMarkerHit",getRootElement(),RespawnGUI) function kill2() setElementHealth(source,0) end addEvent("kill", true) addEventHandler("kill",getRootElement(),kill2)
-
Use: onClientPlayerWeaponFire
-
getTickCount Y evento: onClientRender
-
Change this line on the server side: addEventHandler ("onMarkerHit",getRootElement(),RespawnGUI) To: addEventHandler ("onMarkerHit",getRootElement(),RespawnGUI2) And use this for client side: GUIEditor = { tab = {}, button = {}, edit = {}, window = {}, gridlist = {}, label = {}, tabpanel = {}, } GUIEditor.window[1] = guiCreateWindow(240, 267, 632, 467, "Hawk|RPG Disc System", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1], false) GUIEditor.tabpanel[1] = guiCreateTabPanel(10, 23, 613, 388, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Disc", GUIEditor.tabpanel[1]) GUIEditor.label[1] = guiCreateLabel(15, 36, 226, 59, "Address:", false, GUIEditor.tab[1]) local font_0 = guiCreateFont(":[Hawk]GuiEditor/fonts/PetitFormalScript.ttf") guiSetFont(GUIEditor.label[1], font_0) guiLabelSetColor(GUIEditor.label[1], 255, 254, 254) GUIEditor.label[2] = guiCreateLabel(15, 95, 226, 59, "Value:", false, GUIEditor.tab[1]) guiSetFont(GUIEditor.label[2], font_0) guiLabelSetColor(GUIEditor.label[2], 255, 254, 254) GUIEditor.label[3] = guiCreateLabel(15, 154, 226, 59, "Owner:", false, GUIEditor.tab[1]) guiSetFont(GUIEditor.label[3], font_0) guiLabelSetColor(GUIEditor.label[3], 255, 254, 254) GUIEditor.button[1] = guiCreateButton(21, 229, 129, 44, "Buy", false, GUIEditor.tab[1]) GUIEditor.button[2] = guiCreateButton(21, 300, 129, 44, "Sell", false, GUIEditor.tab[1]) GUIEditor.tab[2] = guiCreateTab("Garage", GUIEditor.tabpanel[1]) GUIEditor.gridlist[1] = guiCreateGridList(13, 23, 587, 197, false, GUIEditor.tab[2]) guiGridListAddColumn(GUIEditor.gridlist[1], "Names", 0.2) guiGridListAddColumn(GUIEditor.gridlist[1], "Health", 0.2) guiGridListAddColumn(GUIEditor.gridlist[1], "Fuel", 0.2) guiGridListAddColumn(GUIEditor.gridlist[1], "Cost", 0.2) guiGridListAddColumn(GUIEditor.gridlist[1], "Status", 0.2) GUIEditor.button[3] = guiCreateButton(28, 234, 175, 67, "Spawn Vehicle", false, GUIEditor.tab[2]) GUIEditor.button[4] = guiCreateButton(226, 234, 175, 67, "Repair Vehicle", false, GUIEditor.tab[2]) GUIEditor.button[5] = guiCreateButton(420, 234, 175, 67, "Park Vehicle", false, GUIEditor.tab[2]) GUIEditor.tab[3] = guiCreateTab("Weapons", GUIEditor.tabpanel[1]) GUIEditor.gridlist[2] = guiCreateGridList(26, 69, 220, 285, false, GUIEditor.tab[3]) guiGridListAddColumn(GUIEditor.gridlist[2], "Weapon", 0.4) guiGridListAddColumn(GUIEditor.gridlist[2], "Ammo", 0.4) GUIEditor.gridlist[3] = guiCreateGridList(383, 69, 220, 285, false, GUIEditor.tab[3]) guiGridListAddColumn(GUIEditor.gridlist[3], "Weapon", 0.4) guiGridListAddColumn(GUIEditor.gridlist[3], "Ammo", 0.4) GUIEditor.label[4] = guiCreateLabel(63, 48, 219, 42, "Your Weapons", false, GUIEditor.tab[3]) guiSetFont(GUIEditor.label[4], font_0) GUIEditor.label[5] = guiCreateLabel(468, 48, 219, 42, "Storage", false, GUIEditor.tab[3]) guiSetFont(GUIEditor.label[5], font_0) GUIEditor.button[6] = guiCreateButton(262, 118, 103, 55, "--->", false, GUIEditor.tab[3]) GUIEditor.button[7] = guiCreateButton(262, 228, 103, 55, "<---", false, GUIEditor.tab[3]) GUIEditor.edit[1] = guiCreateEdit(264, 180, 101, 43, " ammo ", false, GUIEditor.tab[3]) GUIEditor.button[9] = guiCreateButton(255, 10, 125, 61, "Done", false, GUIEditor.tab[3]) GUIEditor.button[10] = guiCreateButton(32, 419, 187, 39, "Start New Life", false, GUIEditor.window[1]) GUIEditor.button[11] = guiCreateButton(426, 418, 187, 39, "Close", false, GUIEditor.window[1]) function kill3() triggerServerEvent("kill", localPlayer) hide() end addEventHandler("onClientGUIClick", GUIEditor.button[5], kill3, false) function hide() guiSetVisible(GUIEditor.window[1], false) showCursor ( false ) end addEventHandler( "onClientResourceStart", getRootElement( ), hide) addEventHandler ( "onClientGUIClick", GUIEditor.button[4], hide, false ) addEvent ("RespawnGUI",true) addEventHandler ("RespawnGUI",root, function ( ) guiSetVisible(GUIEditor.window[1], true) showCursor ( true ) end )
-
You're welcome.
-
You can disable his controls, so he can't drive the vehicle. Use: toggleControl
-
That's because you are freezing the player, but you should freeze the vehicle instead.
-
That's because you never put to do it. GUIEditor = { tab = {}, button = {}, edit = {}, window = {}, gridlist = {}, label = {}, tabpanel = {}, } GUIEditor.window[1] = guiCreateWindow(240, 267, 632, 467, "Hawk|RPG Disc System", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor_Window[1], false) GUIEditor.tabpanel[1] = guiCreateTabPanel(10, 23, 613, 388, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Disc", GUIEditor.tabpanel[1]) GUIEditor.label[1] = guiCreateLabel(15, 36, 226, 59, "Address:", false, GUIEditor.tab[1]) local font_0 = guiCreateFont(":[Hawk]GuiEditor/fonts/PetitFormalScript.ttf") guiSetFont(GUIEditor.label[1], font_0) guiLabelSetColor(GUIEditor.label[1], 255, 254, 254) GUIEditor.label[2] = guiCreateLabel(15, 95, 226, 59, "Value:", false, GUIEditor.tab[1]) guiSetFont(GUIEditor.label[2], font_0) guiLabelSetColor(GUIEditor.label[2], 255, 254, 254) GUIEditor.label[3] = guiCreateLabel(15, 154, 226, 59, "Owner:", false, GUIEditor.tab[1]) guiSetFont(GUIEditor.label[3], font_0) guiLabelSetColor(GUIEditor.label[3], 255, 254, 254) GUIEditor.button[1] = guiCreateButton(21, 229, 129, 44, "Buy", false, GUIEditor.tab[1]) GUIEditor.button[2] = guiCreateButton(21, 300, 129, 44, "Sell", false, GUIEditor.tab[1]) GUIEditor.tab[2] = guiCreateTab("Garage", GUIEditor.tabpanel[1]) GUIEditor.gridlist[1] = guiCreateGridList(13, 23, 587, 197, false, GUIEditor.tab[2]) guiGridListAddColumn(GUIEditor.gridlist[1], "Names", 0.2) guiGridListAddColumn(GUIEditor.gridlist[1], "Health", 0.2) guiGridListAddColumn(GUIEditor.gridlist[1], "Fuel", 0.2) guiGridListAddColumn(GUIEditor.gridlist[1], "Cost", 0.2) guiGridListAddColumn(GUIEditor.gridlist[1], "Status", 0.2) GUIEditor.button[3] = guiCreateButton(28, 234, 175, 67, "Spawn Vehicle", false, GUIEditor.tab[2]) GUIEditor.button[4] = guiCreateButton(226, 234, 175, 67, "Repair Vehicle", false, GUIEditor.tab[2]) GUIEditor.button[5] = guiCreateButton(420, 234, 175, 67, "Park Vehicle", false, GUIEditor.tab[2]) GUIEditor.tab[3] = guiCreateTab("Weapons", GUIEditor.tabpanel[1]) GUIEditor.gridlist[2] = guiCreateGridList(26, 69, 220, 285, false, GUIEditor.tab[3]) guiGridListAddColumn(GUIEditor.gridlist[2], "Weapon", 0.4) guiGridListAddColumn(GUIEditor.gridlist[2], "Ammo", 0.4) GUIEditor.gridlist[3] = guiCreateGridList(383, 69, 220, 285, false, GUIEditor.tab[3]) guiGridListAddColumn(GUIEditor.gridlist[3], "Weapon", 0.4) guiGridListAddColumn(GUIEditor.gridlist[3], "Ammo", 0.4) GUIEditor.label[4] = guiCreateLabel(63, 48, 219, 42, "Your Weapons", false, GUIEditor.tab[3]) guiSetFont(GUIEditor.label[4], font_0) GUIEditor.label[5] = guiCreateLabel(468, 48, 219, 42, "Storage", false, GUIEditor.tab[3]) guiSetFont(GUIEditor.label[5], font_0) GUIEditor.button[6] = guiCreateButton(262, 118, 103, 55, "--->", false, GUIEditor.tab[3]) GUIEditor.button[7] = guiCreateButton(262, 228, 103, 55, "<---", false, GUIEditor.tab[3]) GUIEditor.edit[1] = guiCreateEdit(264, 180, 101, 43, " ammo ", false, GUIEditor.tab[3]) GUIEditor.button[9] = guiCreateButton(255, 10, 125, 61, "Done", false, GUIEditor.tab[3]) GUIEditor.button[10] = guiCreateButton(32, 419, 187, 39, "Start New Life", false, GUIEditor.window[1]) GUIEditor.button[11] = guiCreateButton(426, 418, 187, 39, "Close", false, GUIEditor.window[1]) function kill3() triggerServerEvent("kill", localPlayer) hide() end addEventHandler("onClientGUIClick", GUIEditor_Button[5], kill3, false) function hide() guiSetVisible(GUIEditor_Window[1], false) showCursor ( false ) end addEventHandler( "onClientResourceStart", getRootElement( ), hide) addEventHandler ( "onClientGUIClick", GUIEditor_Button[4], hide, false ) addEvent ("RespawnGUI",true) addEventHandler ("RespawnGUI",root, function ( ) guiSetVisible(GUIEditor_Window[1], true) showCursor ( true ) end )
-
What is the problem? errors in debug?
-
GUIEditor = { tab = {}, button = {}, edit = {}, window = {}, gridlist = {}, label = {}, tabpanel = {}, } GUIEditor.window[1] = guiCreateWindow(240, 267, 632, 467, "Hawk|RPG Disc System", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor_Window[1], false) GUIEditor.tabpanel[1] = guiCreateTabPanel(10, 23, 613, 388, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Disc", GUIEditor.tabpanel[1]) GUIEditor.label[1] = guiCreateLabel(15, 36, 226, 59, "Address:", false, GUIEditor.tab[1]) local font_0 = guiCreateFont(":[Hawk]GuiEditor/fonts/PetitFormalScript.ttf") guiSetFont(GUIEditor.label[1], font_0) guiLabelSetColor(GUIEditor.label[1], 255, 254, 254) GUIEditor.label[2] = guiCreateLabel(15, 95, 226, 59, "Value:", false, GUIEditor.tab[1]) guiSetFont(GUIEditor.label[2], font_0) guiLabelSetColor(GUIEditor.label[2], 255, 254, 254) GUIEditor.label[3] = guiCreateLabel(15, 154, 226, 59, "Owner:", false, GUIEditor.tab[1]) guiSetFont(GUIEditor.label[3], font_0) guiLabelSetColor(GUIEditor.label[3], 255, 254, 254) GUIEditor.button[1] = guiCreateButton(21, 229, 129, 44, "Buy", false, GUIEditor.tab[1]) GUIEditor.button[2] = guiCreateButton(21, 300, 129, 44, "Sell", false, GUIEditor.tab[1]) GUIEditor.tab[2] = guiCreateTab("Garage", GUIEditor.tabpanel[1]) GUIEditor.gridlist[1] = guiCreateGridList(13, 23, 587, 197, false, GUIEditor.tab[2]) guiGridListAddColumn(GUIEditor.gridlist[1], "Names", 0.2) guiGridListAddColumn(GUIEditor.gridlist[1], "Health", 0.2) guiGridListAddColumn(GUIEditor.gridlist[1], "Fuel", 0.2) guiGridListAddColumn(GUIEditor.gridlist[1], "Cost", 0.2) guiGridListAddColumn(GUIEditor.gridlist[1], "Status", 0.2) GUIEditor.button[3] = guiCreateButton(28, 234, 175, 67, "Spawn Vehicle", false, GUIEditor.tab[2]) GUIEditor.button[4] = guiCreateButton(226, 234, 175, 67, "Repair Vehicle", false, GUIEditor.tab[2]) GUIEditor.button[5] = guiCreateButton(420, 234, 175, 67, "Park Vehicle", false, GUIEditor.tab[2]) GUIEditor.tab[3] = guiCreateTab("Weapons", GUIEditor.tabpanel[1]) GUIEditor.gridlist[2] = guiCreateGridList(26, 69, 220, 285, false, GUIEditor.tab[3]) guiGridListAddColumn(GUIEditor.gridlist[2], "Weapon", 0.4) guiGridListAddColumn(GUIEditor.gridlist[2], "Ammo", 0.4) GUIEditor.gridlist[3] = guiCreateGridList(383, 69, 220, 285, false, GUIEditor.tab[3]) guiGridListAddColumn(GUIEditor.gridlist[3], "Weapon", 0.4) guiGridListAddColumn(GUIEditor.gridlist[3], "Ammo", 0.4) GUIEditor.label[4] = guiCreateLabel(63, 48, 219, 42, "Your Weapons", false, GUIEditor.tab[3]) guiSetFont(GUIEditor.label[4], font_0) GUIEditor.label[5] = guiCreateLabel(468, 48, 219, 42, "Storage", false, GUIEditor.tab[3]) guiSetFont(GUIEditor.label[5], font_0) GUIEditor.button[6] = guiCreateButton(262, 118, 103, 55, "--->", false, GUIEditor.tab[3]) GUIEditor.button[7] = guiCreateButton(262, 228, 103, 55, "<---", false, GUIEditor.tab[3]) GUIEditor.edit[1] = guiCreateEdit(264, 180, 101, 43, " ammo ", false, GUIEditor.tab[3]) GUIEditor.button[9] = guiCreateButton(255, 10, 125, 61, "Done", false, GUIEditor.tab[3]) GUIEditor.button[10] = guiCreateButton(32, 419, 187, 39, "Start New Life", false, GUIEditor.window[1]) GUIEditor.button[11] = guiCreateButton(426, 418, 187, 39, "Close", false, GUIEditor.window[1]) function kill3() triggerServerEvent("kill", localPlayer) hide() end addEventHandler("onClientGUIClick", GUIEditor_Button[5], kill3, false) function hide() guiSetVisible(GUIEditor_Window[1], false) showCursor ( false ) end addEventHandler( "onClientResourceStart", getRootElement( ), hide) addEventHandler ( "onClientGUIClick", GUIEditor_Button[4], hide, false ) addEvent ("RespawnGUI",true) addEventHandler ("RespawnGUI",getResourceRootElement(getThisResource()),RespawnGUI2)
-
Here: addEventHandler ("onResourceStart",getResourceRootElement(getThisResource()),Respawn-function1) You forgot to remove the "-". addEventHandler ( "onResourceStart", resourceRoot, Respawnfunction1 )
-
Seems like I get you wrong, forget all about what I said before.
-
Post your server side script.
-
That's an error on the client side, and pickup is server side, should be created still. Anyway, remove the 'end' at line 108 on the client side script.
-
When you show the radio gui, add it, then add the same but with 'false' when hide it.
-
Disable the input with: guiSetInputEnabled ( true )
-
Write: "/debugscript 3" in the chat and see if it has any error.
-
Then, instead of using "kills" data name, use "points". To add + 1 each time use: setElementData ( player, "points", getElementData ( player, "points" ) + 1 ) But the first argument of 'onPlayerWasted' is the totalAmmo, not a player element.
-
Tell us what's wrong.
-
Must be because 'kills' is returning 'false', this should return '0' if he has no data. function checkPoints ( player ) local points = getElementData ( player, "kills" ) or 0 outputChatBox ( "Points: ".. points, player, 255, 255, 255 ) end addCommandHandler ( "points", checkPoints )
-
You must use the function: removeWorldModel
-
You're welcome.
-
The event handler should go after the function creation. function startTimer() if not question then tInterval = math.random(180000, 360000) setTimer(postQuestion, tInterval, 1) end end addEventHandler("onResourceStart", resourceRoot, startTimer)