-
Posts
3,267 -
Joined
-
Last visited
-
Days Won
7
Everything posted by Tete omar
-
I didn't figure out your topic correctly but you can use this setTimer and this destroyElement AFAIK
-
if something you can't figure it out or script that you created and asking for help i would be active posting answers on your topic Regards
-
Why you changed your post to --- ?
-
when some one hit the marker the Gui-window show up for all players ??????? server side local Marker2 = createMarker ( -1638.3317871094, -2239.3054199219, 30.4765625, "cylinder", 1.29999995, 255, 255, 0, 255 ) function hitthiselement() triggerClientEvent("hitmymarker", getRootElement(), Marker2) end addEventHandler("onMarkerHit", Marker2, hitthiselement) client side addEvent("hitmymarker", true) function hitmymarker(Marker2) guiSetVisible(GUIEditor_Window[2], true) showCursor(true) guiSetInputEnabled(false) end addEventHandler('hitmymarker',getRootElement(),hitmymarker) GUIEditor_Window[2] = guiCreateWindow(198,228,697,409,"> - | The Farmer House | - <",false) guiSetAlpha(GUIEditor_Window[2],1) GUIEditor_TabPanel[1] = guiCreateTabPanel(9,22,679,368,false,GUIEditor_Window[2]) GUIEditor_Tab[2] = guiCreateTab("English",GUIEditor_TabPanel[1]) GUIEditor_Label[8] = guiCreateLabel(223,11,165,18,"The Farmer House",false,GUIEditor_Tab[2]) guiLabelSetColor(GUIEditor_Label[8],255,255,0) guiLabelSetHorizontalAlign(GUIEditor_Label[8],"center",false) guiSetFont(GUIEditor_Label[8],"default-bold-small") GUIEditor_Image[4] = guiCreateStaticImage(14,31,656,156,"images/farmerhouse.PNG",false,GUIEditor_Tab[2]) GUIEditor_Label[9] = guiCreateLabel(11,191,655,21,"This house is your house and your friends house .. you must save and take this house as possible as you can",false,GUIEditor_Tab[2]) guiLabelSetColor(GUIEditor_Label[9],255,0,0) guiLabelSetHorizontalAlign(GUIEditor_Label[9],"center",false) guiSetFont(GUIEditor_Label[9],"default-bold-small") GUIEditor_Label[10] = guiCreateLabel(22,209,656,25,"After your occupation of this house the door will be blocked that the zombies can't get in this house",false,GUIEditor_Tab[2]) guiLabelSetColor(GUIEditor_Label[10],255,0,0) guiLabelSetHorizontalAlign(GUIEditor_Label[10],"center",false) guiSetFont(GUIEditor_Label[10],"default-bold-small") GUIEditor_Image[5] = guiCreateStaticImage(5,226,78,96,"images/protectiondoor.PNG",false,GUIEditor_Tab[2]) GUIEditor_Label[11] = guiCreateLabel(4,322,210,16,"the house's entrance with out a door",false,GUIEditor_Tab[2]) GUIEditor_Label[12] = guiCreateLabel(16,227,655,15,"You must save this house to keep your self unharmed but there's a windows that you can kill the zombies through it",false,GUIEditor_Tab[2]) guiLabelSetColor(GUIEditor_Label[12],255,0,0) guiSetFont(GUIEditor_Label[12],"default-bold-small") GUIEditor_Image[6] = guiCreateStaticImage(417,245,251,77,"images/protectwindow.PNG",false,GUIEditor_Tab[2]) GUIEditor_Label[13] = guiCreateLabel(414,320,264,20,"the windows",false,GUIEditor_Tab[2]) guiLabelSetHorizontalAlign(GUIEditor_Label[13],"center",false) GUIEditor_Button[4] = guiCreateButton(564,6,105,26,"start mession",false,GUIEditor_Tab[2]) guiSetVisible(GUIEditor_Window[2], false) please i want to fix this problem for fast !!!!
-
problem was resolved.
-
Hello guys i'm confused here .. fixing1 = createMarker ( -1630.6768798828, -2246.8481445313, 30.4765625, "cylinder", 1.5, 0, 255, 0, 250 ) fixing2 = createMarker ( -1635.0782470703, -2247.6643066406, 30.4765625, "cylinder", 1.5, 0, 255, 0, 250 ) fixing3 = createMarker ( -1636.6318359375, -2245.0166015625, 30.4765625, "cylinder", 1.5, 0, 255, 0, 250 ) function hitmyelement1 ( hitElement ) setPedAnimation(hitElement, "ped", "BIKE_elbowR") setTimer( setPedAnimation, 3000, 1, hitElement ) setTimer(destroyElement,3000,1,fixing1 ) setTimer(destroyElement,3000,1,fightWindow1 ) end addEventHandler("onMarkerHit", fixing1, hitmyelement1) function hitmyelement2 ( hitElement ) setPedAnimation(hitElement, "ped", "BIKE_elbowR") setTimer( setPedAnimation, 3000, 1, hitElement ) setTimer(destroyElement,3000,1,fixing2 ) setTimer(destroyElement,3000,1,fightWindow2 ) end addEventHandler("onMarkerHit", fixing2, hitmyelement2) function hitmyelement3 ( hitElement ) setPedAnimation(hitElement, "ped", "BIKE_elbowR") setTimer( setPedAnimation, 3000, 1, hitElement ) setTimer(destroyElement,3000,1,fixing3 ) setTimer(destroyElement,3000,1,fightWindow3 ) end addEventHandler("onMarkerHit", fixing2, hitmyelement3) i want here if i hit the first marker .. the second marker show up and when i hit the second marker the third marker show up etc.. but i can't figure it out i tried to make it .. but it only works with client side like this client side example local gate = createObject(980, 1002.599609375, -2310.19921875, 14.89999961853, 0, 0, 295.99914550781) local Narkar = createMarker(1002.5999755859, -2310.1999511719, 10.89999961853, "cylinder", 10, 255, 0, 0, 0) local saro5 = createObject(17049, 872.099609375, -2367.69921875, 13.699999809265, 0, 0, 0) function take() if( getPlayerMoney( localPlayer ) >= 100000 ) then takePlayerMoney (100000) outputChatBox("#00ff00You bought a ticket the rocket is ready now have a nice trip.",255,255,255,true) moveObject(gate, 10000, 1002.599609375, -2310.19921875, 17.799999237061) guiSetVisible(GUIEditor_Window[1],false) guiSetInputEnabled(false) showCursor(false) myblip = createBlip ( 875.91003417969, -2365.7399902344, 11.800000190735, 56 ) local myarrow = createMarker(875.91003417969, -2365.7399902344, 11.800000190735, "cylinder", 3, 255, 255, 0, 255) addEventHandler('onClientMarkerHit', myarrow,function(hitPlayer) if (hitPlayer == localPlayer) then triggerServerEvent("fademycamera", localPlayer) moveObject(saro5, 30000, 872.09997558594, -2367.6999511719, 308.79998779297) createExplosion ( 871.61590576172, -2367.0283203125, 15.806823730469, 2, true, 9.0, false ) createExplosion ( 871.61590576172, -2367.0283203125, 15.806823730469, 2, true, 9.0, false ) setCameraTarget( saro5 ) setTimer(destroyElement,2000,1,myarrow ) setTimer(destroyElement,2000,1,myblip ) setElementInterior ( localPlayer, 1, 0.63636815547943, 35.855613708496, 1199.6011962891 ) cont = 16 local text = guiCreateLabel(636,213,97,58,"",false) guiLabelSetColor(text,255,255,0) guiSetFont(text,"sa-gothic") setTimer(function() cont = cont -1 guiSetText(text,cont) setElementInterior ( localPlayer, 0, 1653.2805175781, -3289.0695800781, 793.626953125 ) setWeather ( 9 ) setGravity ( 0.0010 ) end,1000,16) so it really confused me i want like this on server side
-
ooops thanks it worked now thanks aloot !!!!
-
sorry it doesn't work when i hit the marker
-
no, i mean unfreeze him .. i can't move from the current animation so setTimer doesn't work .. i want set the player animation for 3 seconds .."3000" ofc so should i use setTimer(setElementFrozen, 3000, 1, hitElement, "ped", "BIKE_elbowR", false) or what
-
have you idea how do i stop the player : ) can't stop and thanks
-
server side fixing1 = createMarker ( -1633.3894042969, -2237.8020019531, 30.4765625, "cylinder", 1.5, 255, 255, 0, 200 ) function hitmyelement1() setPedAnimation(source, "ped", "BIKE_elbowR") setTimer(setPedAnimation, 1000, 1, source, "ped", "BIKE_elbowR") end addEventHandler("onMarkerHit", fixing1, hitmyelement1) if i hit this marker nothing happens why ??
-
doesn't work tapl and i told you i don't want to use setTime function ... but. .. .. .. i keep try it over then over .. nothing supports me i guess thanks all
-
get ( "#time" ) set ( "#time", 00:00 ) how about this .. i see the time suddenly changed when i restarted the gamemode .. but i want it if i press the button
-
hmm i used it like this TAPL function thebutton1() destroyElement( Marker2 ) set ("#time", 00:00) end addEventHandler('thebutton1',getRootElement(),thebutton1) it worked but i want to set time when i press on the button not when the resource start :\
-
xmlNodeSetName is fit i guess .. and sorry .. for the first time i use XML functions
-
how ???? XML functions ??
-
If i want to change something into meta.xml file should i use fileWrite ? ok i want to use it after click on a button like this server side addEvent("thebutton1", true) function thebutton1() destroyElement( Marker2 ) end addEventHandler('thebutton1',getRootElement(),thebutton1) addEvent("thebutton2", true) function thebutton2() destroyElement( Marker2 ) end addEventHandler('thebutton2',getRootElement(),thebutton2) client side function closethewindow() if ( source == GUIEditor_Button[3] ) then guiSetVisible(GUIEditor_Window[2], false) showCursor(false) guiSetInputEnabled(false) triggerServerEvent("thebutton1", getRootElement()) outputChatBox(" now go take this house", getRootElement(), 255,255,0 ) elseif ( source == GUIEditor_Button[4] ) then guiSetVisible(GUIEditor_Window[2], false) showCursor(false) guiSetInputEnabled(false) triggerServerEvent("thebutton2", getRootElement()) outputChatBox(" now go take this house !!! ", getRootElement(), 255,255,0 ) end end addEventHandler('onClientGUIClick', root, closethewindow) this is 2 buttons on 2 tabs so .. i want here to make fileWrite happens after this function thebutton1() destroyElement( Marker2 ) fileWrite("meta.xml", "anything here") end addEventHandler('thebutton1',getRootElement(),thebutton1) addEvent("thebutton2", true) function thebutton2() destroyElement( Marker2 ) fileWrite("meta.xml", "anything here") end addEventHandler('thebutton2',getRootElement(),thebutton2) but i don't want the meta.xml only " anything here " here's the meta.xml file "#minplayers" value="[ 0 ]"> "#maxplayers" value="[ 128 ]"> "#gravity" value="[ 0.008000 ]"> "#weather" value="[ 0 ]"> "#time" value="6:0"> "#locked_time" value="[ false ]"> "#waveheight" value="[ 0 ]"> "#gamespeed" value="[ 1 ]"> "maps/MAKR1.map" dimension="0"> actually i want to change time to 00:00 into the meta file but not to use setTime function suppose i do like this function thebutton1() destroyElement( Marker2 ) fileWrite("meta.xml", "" value="00:00">") end addEventHandler('thebutton1',getRootElement(),thebutton1) addEvent("thebutton2", true) function thebutton2() destroyElement( Marker2 ) fileWrite("meta.xml", "" value="00:00">") end addEventHandler('thebutton2',getRootElement(),thebutton2) if there are an otherwise i would be thankful if you told me here.
-
no events and i'm sure i see no events .......
-
but auto-completion doesn't supports the events .. only the functions : |
-
i already changed the functions names. sigh but i still looking for the solve which makes the texts are public for all .. We already given you the solution. Read the previous post, if you want ignore the solution then it your problem, I'm not going make the code for you. listen, i didn't asked you to make this code for me. but i just want the codes like you can use this ... and this ... etc .. that's all and i will fix it with my self and thanks all for help.
-
i already changed the functions names. sigh but i still looking for the solve which makes the texts are public for all ..
-
well i had enough that's the one -- make send messages with ENTER tab1 function letsmakeitwithenter ( element ) local mytext = guiGetText ( theedit ) local mytext2 = guiGetText(mymemo) local Player = getLocalPlayer( ) if ( ( mytext ) and ( mytext ~= "" ) ) then mytext2 = mytext2 .. getPlayerName(getLocalPlayer( )) ..": "..mytext.."\n" guiSetText(mymemo, mytext2) guiMemoSetCaretIndex(mymemo, string.len(mytext2)) triggerServerEvent("Soundsgood", getLocalPlayer( ), Player, mytext) guiSetText(theedit, "") end end addEventHandler ( "onClientGUIAccepted", theedit, letsmakeitwithenter) -- make send messages with ENTER tab2 function letsmakeitwithenter ( element ) local mytext = guiGetText ( theedit2 ) local mytext2 = guiGetText( mymemo2 ) local Player = getLocalPlayer( ) if ( ( mytext ) and ( mytext ~= "" ) ) then mytext2 = mytext2 .. getPlayerName(getLocalPlayer( )) ..": "..mytext .."\n" guiSetText(mymemo2, mytext2) guiMemoSetCaretIndex(mymemo2, string.len(mytext2)) triggerServerEvent("Soundsgood2", getLocalPlayer( ), Player, mytext ) guiSetText(theedit2, "") end end addEventHandler ( "onClientGUIAccepted", theedit2, letsmakeitwithenter) -- make send messages with ENTER tab3 function letsmakeitwithenter ( element ) local mytext = guiGetText ( theedit3 ) local mytext2 = guiGetText( mymemo3 ) local Player = getLocalPlayer( ) if ( ( mytext ) and ( mytext ~= "" ) ) then mytext2 = mytext2 .. getPlayerName(getLocalPlayer( )) ..": "..mytext .."\n" guiSetText(mymemo3, mytext2) guiMemoSetCaretIndex(mymemo3, string.len(mytext2)) triggerServerEvent("Soundsgood3", getLocalPlayer( ), Player, mytext ) guiSetText(theedit3, "") end end addEventHandler ( "onClientGUIAccepted", theedit3, letsmakeitwithenter) server side i will not show it but my problem is here
-
onClientGUIClick and onClientGUIAccepted, both have different parametres. Hence, these two conditions fail: function wonderful(state,thePlayer) if state == "left" then if ( source == sendbutton3 ) then end end end i guess function wonderful(button,thePlayer) if button == "left" then if ( source == sendbutton3 ) then is better
-
It's wrong. You can't use spaces in event name. You should use original event name. Read wiki before post something. Also you don't use attach element in this handlers addEventHandler( "onClientGUIAccepted", theedit) addEventHandler(" onClientGUIAccepted", theedit2) addEventHandler(" onClientGUIAccepted", theedit3) he attach it to element but he didn't attach it to function. Even though addEventHandler("onClientGUIAccepted", theedit, wonderful) addEventHandler("onClientGUIAccepted", theedit2, wonderful) addEventHandler("onClientGUIAccepted", theedit3, wonderful) it doesn't send by ENTER key but have i to change the functions names for the event handlers ?