-
Posts
4,961 -
Joined
-
Last visited
Everything posted by Jaysds1
-
try this: local animations = { { "RIOT", "RIOT_ANGRY" }, { "RIOT", "RIOT_ANGRY_B" }, { "RIOT", "RIOT_challenge" }, { "RIOT", "RIOT_CHANT" }, { "RIOT", "RIOT_FUKU" }, { "RIOT", "RIOT_PUNCHES" }, { "RIOT", "RIOT_shout" } } bindKey( "i", "down",function() if ( guiGetVisible( guiElement1 ) == false ) then guiSetVisible( guiElement1, true ) showCursor( true ) end end) addEventHandler( "onClientResourceStart", resourceRoot,function() for i = 1, #animations do guiElement[i] = guiGridListAddRow( guiElement2 ) guiGridListSetItemText( guiElement2, guiElement5, guiElement[i], animations[i][1], false, false ) guiGridListSetItemText( guiElement2, guiElement6, guiElement[i], animations[i][2], false, false ) end end) addEventHandler( "onClientGUIClick", guiRoot,function() if ( source == guiElement3 ) then if ( guiGridListGetSelectedItem( guiElement2 ) == guiElement[i], guiElement5 ) and ( guiGridListGetSelectedItem( guiElement2 ) == guiElement[i], guiElement6 ) then local block = guiGridListGetItemText( guiElement2, guiGridListGetSelectedItem( guiElement2 ), guiElement5 ) local animation = guiGridListGetItemText( guiElement2, guiGridListGetSelectedItem( guiElement2 ), guiElement6 ) if ( block ) and ( animation ) then triggerServerEvent( "onElementAnimation", elementPlayer, block, animation ) end end elseif ( source == guiElement4 ) then guiSetVisible( guiElement1, false ) showCursor( false ) end end)
-
try this: thearmsmark = {} function sell(source, commaneName) setElementFrozen(source, true) local x,y,z = getElementPosition(source) thearmsmark[source] = createMarker( x, y, z, "cylinder", 1.2, 255, 0, 0, 170 ) setElementData(source,"SellingArms", true) setElementData(thearmsmark[source], "ownedby", getPlayerName(source)) end function buy(source) local x,y,z = getElementPosition(source) local colshape1 = createColSphere(x-3,y+3,z-4,10) for i,seller in ipairs(getElementsWithinColShape ( colshape1, "player" )) do if getElementData(seller, "SellingArms") == true then if isElementWithinMarker(source, thearmsmark[seller]) then setElementData(source,"BuyingArmsFrom", getPlayerName(seller)) triggerClientEvent(source,"showarmspanelARMS",root) destroyElement(colshape1) else end end end end BTW, Why do you need the colshape?
-
sorry for late reply, try this, Server: addEventHandler("onPlayerLogin",root,function() triggerClientEvent(source, "onVisibleSpawnGUI",root) end) addEvent ("spawnPlayer_hombre",true) addEventHandler ("spawnPlayer_hombre",root,function(character) spawnPlayer ( client, 221.478515625, 1878.2919921875, 17.640625) setPedSkin ( client, 59 ) setPlayerTeam( client, ctm ) giveWeapon( client, 31, 400 ) outputChatBox ("Te Generaste como "..character.."!",client,225,225,0) end) addEvent ("spawnPlayer_mujer",true) addEventHandler ("spawnPlayer_mujer",root,function(character) spawnPlayer ( client, 226.5859375, 1878.255859375, 17.640625) setPedSkin ( client, 246 ) setPlayerTeam( client, ctm2 ) giveWeapon( client, 31, 400 ) outputChatBox ("Te Generaste como "..character.."!",client,255, 0, 255) end) addEvent ("spawnPlayer_odst",true) addEventHandler ("spawnPlayer_odst",root,function(character) spawnPlayer ( client, -1434.138671875, 495.91015625, 11.1953125) setPedSkin ( client, 60 ) setPlayerTeam( client, ctm3 ) giveWeapon( client, 31, 400 ) giveWeapon( client, 22, 600 ) outputChatBox ("Te Generaste como "..character.."!",client,225,225,0) end) addEvent ("spawnPlayer_LPK",true) addEventHandler ("spawnPlayer_LPK",root,function(character) local accName = getAccountName ( getPlayerAccount ( client ) ) -- get his account name if isObjectInACLGroup ("user."..accName, aclGetGroup ( "LPK" ) ) then setPlayerTeam( client, ctm4 ) giveWeapon( client, 31, 400 ) giveWeapon( client, 22, 600 ) spawnPlayer ( client, -625.97680664063, 1926.2482910156, 1.2687499523163) outputChatBox ("Te Generaste como "..character.."!",client,225,225,0) setPedSkin ( client, 115 ) if ( not isObjectInACLGroup ("user."..accName, aclGetGroup ( "LPK" ) ) ) then triggerClientEvent(client, "setTheText", root) end end end) function morir () local SkinID = getElementModel( client ) triggerClientEvent(source,"spawng", root) spawnPlayer ( client, 1607.4176025391, 1816.3229980469, 10.8203125 ) setElementModel( client,SkinID) end addEventHandler ("onPlayerWasted", root, morir) function giveWeaponsOnSpawn ( theSpawnpont, theTeam ) giveWeapon ( source, 31, 2000 ) giveWeapon ( source, 24, 200 ) giveWeapon ( source, 25, 300 ) giveWeapon ( source, 34, 300 ) end addEventHandler ( "onPlayerSpawn", getRootElement(), giveWeaponsOnSpawn ) -----Equipos---- ctm = createTeam("Hombres", 255, 0, 0) ctm2 = createTeam("Mujeres", 255, 0, 255) ctm3 = createTeam("ODST Clan", 0, 0, 255) ctm4 = createTeam("[LPK] Clan", 128,128,128) Client: GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} GUIEditor_Window[1] = guiCreateWindow(0.3037,0.75,0.4185,0.1817,"GUI Spawns",true) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Button[1] = guiCreateButton(9,59,97,33,"Hombre",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(121,59,97,33,"Mujer",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(230,59,93,33,"Clan ODST",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(14,26,240,26,"Elige tu Spawn",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[1],"clear-normal") GUIEditor_Button[4] = guiCreateButton(370,-3363,0,600,"",false,GUIEditor_Window[1]) GUIEditor_Button[5] = guiCreateButton(332,59,87,33,"[LPK] Clan",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(198,30,218,15,"BioHaZard Hell Zombies GUI",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[2],"default-bold-small") GUIEditor_Window[2] = guiCreateWindow(0.4121,0.575,0.1943,0.18,"Info Spawn",true) guiWindowSetMovable(GUIEditor_Window[2],false) guiWindowSetSizable(GUIEditor_Window[2],false) GUIEditor_Memo[1] = guiCreateMemo(9,22,181,77,"",false,GUIEditor_Window[2]) guiMemoSetReadOnly(GUIEditor_Memo[1],true) guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) showCursor(false) addEvent("onVisibleSpawnGUI",true) addEventHandler("onVisibleSpawnGUI",root,function() guiSetVisible(GUIEditor_Window[1], true) guiSetVisible(GUIEditor_Window[2], true) showCursor(true) addEventHandler("onClientGUIClick", guiRoot,buttons,true) addEventHandler("onClientMouseEnter",root,mEnter) addEventHandler("onClientMouseLeave",root,mExit) end) function buttons() if source == GUIEditor_Button[1] then guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) showCursor(false) triggerServerEvent ("spawnPlayer_hombre",localPlayer,"Hombre") elseif (source == GUIEditor_Button[2]) then guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) showCursor(false) triggerServerEvent ("spawnPlayer_mujer",localPlayer,"Mujer") elseif (source == GUIEditor_Button[3]) then guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) showCursor(false) triggerServerEvent ("spawnPlayer_odst",localPlayer,"ODST") elseif( source == GUIEditor_Button[5]) then guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) showCursor(false) triggerServerEvent ("spawnPlayer_LPK",localPlayer,"LPK") end end addEventHandler("onClientPlayerWasted",root,function() guiSetVisible(GUIEditor_Window[1],true) guiSetVisible(GUIEditor_Window[2],true) showCursor(true) end) function mostrarspawn() guiSetVisible (GUIEditor_Window[1],true) guiSetVisible (GUIEditor_Window[2],true) showCursor (true) addEventHandler("onClientPedWeaponFire",root, cancelEvent) end addEvent("spawng", true) addEventHandler("spawng",root, mostrarspawn) function mEnter() if (source == GUIEditor_Button[1]) then guiSetText(GUIEditor_Memo[1], "Aprieta este boton si eres Hombre y no tienes ningun clan en especifico") elseif (source == GUIEditor_Button[2]) then guiSetText(GUIEditor_Memo[1], "Aprieta este boton si eres Mujer y no tienes ningun clan en especifico") elseif (source == GUIEditor_Button[3]) then guiSetText(GUIEditor_Memo[1], "Solo si eres de ODST clan Aprieta este boton sino es posible ser kickeado") elseif (source == GUIEditor_Button[5]) then guiSetText(GUIEditor_Memo[1], "LPK Latins Pro Killers Clan Privado Solo Para Pro Killers") end end function mExit() if (source == GUIEditor_Button[1]) then guiSetText(GUIEditor_Memo[1], "") elseif (source == GUIEditor_Button[2]) then guiSetText(GUIEditor_Memo[1], "") elseif (source == GUIEditor_Button[3]) then guiSetText(GUIEditor_Memo[1], "") elseif (source == GUIEditor_Button[5]) then guiSetText(GUIEditor_Memo[1], "") end end addEvent("setTheText", true) addEventHandler("setTheText",root,function() --I've changed localPlayer to root because when your triggering this event from the server side, you should include the source guiSetText(GUIEditor_Memo[1], "No Eres del Clan") guiSetVisible(GUIEditor_Window[1],true) guiSetVisible(GUIEditor_Window[2],true) showCursor(true) end)
-
np, @X-Shadow, It works in MTA 1.4 Nightly, so I think it's fixed...
-
np, @Cadu12, thanks for telling me that, I found my error
-
I know, just thought it would be a good idea
-
oh, you're going to have to use the MTA functions to create a DB, unless you want to use the SQL Browser to create it...
-
ok, try this: local Marker = createMarker ( 1007.4000244141, -2302.6999511719, 12.10000038147, "cylinder", 1.29999995, 255, 0, 0, 255 ) addEventHandler('onClientMarkerHit', Marker,function(hitPlayer) if (hitPlayer == localPlayer) then guiSetVisible(GUIEditor_Window[1], true) showCursor(true) end end) function CreateGUIWindow() GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(502,268,480,290,"",false) GUIEditor_Image[1] = guiCreateStaticImage(240,20,229,261,"images/space.png",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(10,251,91,30,"Buy Ticket",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(155,251,69,30,"Exit",false,GUIEditor_Window[1]) GUIEditor_Memo[1] = guiCreateMemo(15,20,219,221,"=====|MoonTrip|=====\nWelcome to the\" MoonTrip\", the moon trip is wonderful trip full of mystery stuff and nice gravitation,You'll find the absolute fun but try to find fun enough \nbecause time is only 10 minutes you will find above signs should find it in different areas, each one under 5k have a nice time\n====|Ticket|====\nMoon 50,000$=====|MoonTrip|====",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[1],true) guiSetVisible(GUIEditor_Window[1], false) addEventHandler("onClientGUIClick", GUIEditor_Button[2], DestroyWindow, false) addEventHandler("onClientGUIClick", GUIEditor_Button[1], take, false) end addEventHandler("onClientResourceStart", getRootElement(), CreateGUIWindow) function DestroyWindow() guiSetVisible(GUIEditor_Window[1],false) guiSetInputEnabled(false) showCursor(false) end function take() if(getPlayerMoney(localPlayer)>=100000)then takePlayerMoney (100000) guiSetVisible(GUIEditor_Window[1],false) guiSetInputEnabled(false) showCursor(false) else outputChatBox("Sorry, you don't have enough money",100,0,0) end end
-
oh, What do you want to do then?
-
I know, I just thought it would be good for design
-
oh, thanks for correcting me, I was in a rush, anyways, I'll brb
-
I think it's because the event handler was out of the function with the defined button, try this: local Marker = createMarker ( 1007.4000244141, -2302.6999511719, 12.10000038147, "cylinder", 1.29999995, 255, 0, 0, 255 ) addEventHandler('onClientMarkerHit', Marker,function(hitPlayer) if (hitPlayer == localPlayer) then guiSetVisible(GUIEditor_Window[1], true) showCursor(true) end end) function CreateGUIWindow() GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(502,268,480,290,"",false) GUIEditor_Image[1] = guiCreateStaticImage(240,20,229,261,"images/space.png",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(10,251,91,30,"Buy Ticket",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(155,251,69,30,"Exit",false,GUIEditor_Window[1]) GUIEditor_Memo[1] = guiCreateMemo(15,20,219,221,"=====|MoonTrip|=====\nWelcome to the\" MoonTrip\", the moon trip is wonderful trip full of mystery stuff and nice gravitation,You'll find the absolute fun but try to find fun enough \nbecause time is only 10 minutes you will find above signs should find it in different areas, each one under 5k have a nice time\n====|Ticket|====\nMoon 50,000$=====|MoonTrip|====",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[1],true) guiSetVisible(GUIEditor_Window[1], false) addEventHandler("onClientGUIClick", GUIEditor_Button[2], DestroyWindow, false) addEventHandler("onClientGUIClick", GUIEditor_Button[1], takePlayerMoney, false) end addEventHandler("onClientResourceStart", getRootElement(), CreateGUIWindow) function DestroyWindow() guiSetVisible(GUIEditor_Window[1],false) guiSetInputEnabled(false) showCursor(false) end function take() takePlayerMoney (100000) end
-
ya, it seems like the server side is the other problem
-
Hi all, i was thinking about these error messages that comes up on the debug... How about if the error is on server side then it would be another color like orange(I know the default error color is orange), then the client side error is red... I thought it would be easier to define to the player what side the error is on... I hope it's a good idea.
-
Did you created your own table? Probably the script is running through vG's Database
-
You could either put it as a function or local it, exmaple: g_MapInfo("author") function g_MapInfo(string) if(string=="author")then for i,v in ipairs(getResources())do if(getResourceState(v)=="running")then if(getResourceInfo(v,"type")==map)then return getResourceInfo(v,"author") break; end end end end end
-
so, How do you get the map author? if the g_MapInfo is not defined.
-
Nice, I like your car sounds, How long does it take to make these sounds?
-
I think vG already has queries in the table
-
ok, I'll edit this again when I get more info from the race resource... BTW, What race script did you found it in?
-
It depends on what models your replacing, I think... if you remove the highest number and replace your models on a lower number like 100, it's going to be deleted, unless you replace them on the highest number.
-
here: addEvent('setM', true) addEventHandler('SetM', root,function() takePlayerMoney(client, 5000) end)
-
try this: GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} GUIEditor_Window[1] = guiCreateWindow(0.3037,0.75,0.4185,0.1817,"GUI Spawns",true) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Button[1] = guiCreateButton(9,59,97,33,"Hombre",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(121,59,97,33,"Mujer",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(230,59,93,33,"Clan ODST",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(14,26,240,26,"Elige tu Spawn",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[1],"clear-normal") GUIEditor_Button[4] = guiCreateButton(370,-3363,0,600,"",false,GUIEditor_Window[1]) GUIEditor_Button[5] = guiCreateButton(332,59,87,33,"[LPK] Clan",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(198,30,218,15,"BioHaZard Hell Zombies GUI",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[2],"default-bold-small") GUIEditor_Window[2] = guiCreateWindow(0.4121,0.575,0.1943,0.18,"Info Spawn",true) guiWindowSetMovable(GUIEditor_Window[2],false) guiWindowSetSizable(GUIEditor_Window[2],false) GUIEditor_Memo[1] = guiCreateMemo(9,22,181,77,"",false,GUIEditor_Window[2]) guiMemoSetReadOnly(GUIEditor_Memo[1],true) guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) showCursor(false) addEvent("onVisibleSpawnGUI",true) addEventHandler("onVisibleSpawnGUI",root,function() guiSetVisible(GUIEditor_Window[1], true) guiSetVisible(GUIEditor_Window[2], true) showCursor(true) end) addEventHandler("onClientGUIClick", guiRoot,function() addEventHandler("onClientPedWeaponFire",root, if source == GUIEditor_Button[1] then guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) showCursor(false) triggerServerEvent ("spawnPlayer_hombre",localPlayer,"Hombre") elseif (source == GUIEditor_Button[2]) then guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) showCursor(false) triggerServerEvent ("spawnPlayer_mujer",localPlayer,"Mujer") elseif (source == GUIEditor_Button[3]) then guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) showCursor(false) triggerServerEvent ("spawnPlayer_odst",localPlayer,"ODST") elseif( source == GUIEditor_Button[5]) then guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) showCursor(false) triggerServerEvent ("spawnPlayer_LPK",localPlayer,"LPK") end) end,true) addEventHandler("onClientPlayerWasted",root,function() guiSetVisible(GUIEditor_Window[1],true) guiSetVisible(GUIEditor_Window[2],true) showCursor(true) end) function mostrarspawn() guiSetVisible (GUIEditor_Window[1],true) guiSetVisible (GUIEditor_Window[2],true) showCursor (true) addEventHandler("onClientPedWeaponFire",root, cancelEvent) end addEvent("spawng", true) addEventHandler("spawng",root, mostrarspawn) addEventHandler("onClientMouseEnter", root,function() if (source == GUIEditor_Button[1]) then guiSetText(GUIEditor_Memo[1], "Aprieta este boton si eres Hombre y no tienes ningun clan en especifico") elseif (source == GUIEditor_Button[2]) then guiSetText(GUIEditor_Memo[1], "Aprieta este boton si eres Mujer y no tienes ningun clan en especifico") elseif (source == GUIEditor_Button[3]) then guiSetText(GUIEditor_Memo[1], "Solo si eres de ODST clan Aprieta este boton sino es posible ser kickeado") elseif (source == GUIEditor_Button[5]) then guiSetText(GUIEditor_Memo[1], "LPK Latins Pro Killers Clan Privado Solo Para Pro Killers") end end) addEventHandler("onClientMouseLeave",root,function() if (source == GUIEditor_Button[1]) then guiSetText(GUIEditor_Memo[1], "") elseif (source == GUIEditor_Button[2]) then guiSetText(GUIEditor_Memo[1], "") elseif (source == GUIEditor_Button[3]) then guiSetText(GUIEditor_Memo[1], "") elseif (source == GUIEditor_Button[5]) then guiSetText(GUIEditor_Memo[1], "") end end) addEvent("setTheText", true) addEventHandler("setTheText",root,function() --I've changed localPlayer to root because when your triggering this event from the server side, you should include the source guiSetText(GUIEditor_Memo[1], "No Eres del Clan") guiSetVisible(GUIEditor_Window[1],true) guiSetVisible(GUIEditor_Window[2],true) showCursor(true) end) I've added only one comment which is about your triggering Event.