Jump to content

Jacobob14

Members
  • Posts

    266
  • Joined

  • Last visited

Everything posted by Jacobob14

  1. local infectados = createTeam ( "Infectados", 250, 0, 20) local w_Table = {4,6,9} local z_Table = { 67,66,64,63,62,61,60,78,79,80,81 } addEvent( "beaZombie", true ) addEventHandler( "beaZombie", root, function ( ) setPlayerTeam( source, infectados ) takeAllWeapons ( source ) setElementModel( source, z_Table[math.random( 1, #z_Table)]) giveWeapon ( source, w_Table[math.random( 1, #w_Table)] , 1, false ) setElementData( source, "infected", true ) setElementHealth( source, 100 ) setElementData( source, "zombie", true) if isPedInVehicle( source ) then removePedFromVehicle ( source) end end ) addEventHandler( "onVehicleStartEnter", root, function ( thePlayer ) if getPlayerTeam( thePlayer ) == infectados then cancelEvent() end end ) addEventHandler( "onPlayerSpawn", root, function () setElementData( source, "infected", false ) setElementData( source, "zombie", false) end )
  2. because after becoming zombie zombies still attack me... local bloodsounds = {"blood01.wav","blood02.wav","blood03.wav",} local humanidad = 100 local infectados = getTeamFromName( "Infectados" ) local zombie = false local sWidth, sHeight = guiGetScreenSize() local px, py, pz = getElementPosition ( getLocalPlayer ( ) ) addEventHandler( "onClientRender", root, function ( ) lineLength = 114 * ( humanidad / 100 ) lineLength5 = 114 * ( 100 / 100 ) dxDrawRectangle(sWidth-180,sHeight-68,lineLength,17.0,tocolor(0, 0, 255, 255),false) dxDrawRectangle(sWidth-180,sHeight-68,lineLength5,17.0,tocolor(0, 0, 0, 170),false) dxDrawText("Humanidad: "..math.ceil(humanidad ).."%",sWidth-180,sHeight-66,0,0,tocolor(255,255,255,255),0.4,"bankgothic") end ) addEventHandler( "onClientPlayerDamage", localPlayer, function ( a ) if a then if humanidad >= 20 then local g_Type = getElementType( a ) if g_Type == "ped" then humanidad = humanidad - math.random( 1, 10 ) elseif g_Type == "player" then if getPlayerTeam( a ) == infectados then humanidad = humanidad - math.random( 1, 10 ) end end elseif humanidad <= 20 then humanidad = 0 end end end ) setTimer( function () if not zombie then if humanidad < 100 then if humanidad <= 0 then triggerServerEvent( "infanim", localPlayer ) setTimer( function() triggerServerEvent( "beaZombie", localPlayer ) end, 6000, 1) zombie = true playSound(bloodsounds[math.random(1, #bloodsounds)]) bloodinf() elseif humanidad < 20 then playSound(bloodsounds[math.random(1, #bloodsounds)]) humanidad = 0 bloodinf() elseif humanidad > 20 then humanidad = humanidad - math.random( 1, 10 ) playSound(bloodsounds[math.random(1, #bloodsounds)]) zombie = false bloodinf() end end end end , math.random(20000, 30000) , 0 ) addEventHandler( "onClientPlayerSpawn", localPlayer, function ( ) humanidad = 100 zombie = false end ) addEventHandler( "onClientPlayerDamage", localPlayer, function (_, weapon ) if not zombie then if weapon == 41 then if humanidad <= 99 then humanidad = humanidad + 5 end elseif weapon == 42 then if humanidad >= 99 then humanidad = humanidad - 5 end end end end ) function givetvirus( number ) if humanidad >= 100 then humanidad = humanidad - number end end function giveantivirus() missed = 100 - humanidad if humanidad <= 99 then humanidad = humanidad + missed end end function bloodinf() local randombloodamount = math.random( 10, 30 ) local px, py, pz = getElementPosition ( getLocalPlayer ( ) ) fxAddBlood ( px, py, pz+0.6, 1, 1, 0, randombloodamount, 1 ) end
  3. as it might make you turn green only if players are level greater than 40 GUIEditor_Label[2] = guiCreateLabel(279,570,103,143, tostring ( getElementData ( localPlayer, "level" ) ),false) guiSetFont ( GUIEditor_Label[2], font2 ) guiLabelSetColor( GUIEditor_Label[2], 0, 247, 0)
  4. as I could do that when a player becomes zombie has night sight someone can help me
  5. o Gracias si vos no me lo decía nunca me hubiera dado cuenta :D
  6. Alguien me dice el scrip que hace que el mar se vea asi por las noches plis http://prntscr.com/2t78y3
  7. I had made a mistake already resolved thanks you very much for your help
  8. I corrected but I keep throwing error
  9. error http://prntscr.com/2t70yu
  10. o thanks solid go to try right now
  11. is possible that players have different fighting styles every time you spawn
  12. bindKey("aim_weapon", "both", function(key, keyState) if keyState == "down" then checkWeapon(localPlayer) else removeVision(localPlayer) end end) function checkWeapon(weapon, newSlot, oldSlot) if getPedWeapon(getLocalPlayer(),newSlot) == 34 then bindKey("F", "down", setVisionMode) showText(localPlayer) else unbindKey("F") destroyText(localPlayer) end end function removeVision() setCameraGoggleEffect("normal") destroyText(localPlayer) unbindKey("F") end function destroyText(newSlot) if (getPedWeapon(getLocalPlayer(),newSlot) == 34) then destroyElement(adv) else unbindKey("F") end end function setVisionMode() if(getCameraGoggleEffect() == "normal")then setCameraGoggleEffect("nightvision") elseif(getCameraGoggleEffect() == "nightvision")then setCameraGoggleEffect("thermalvision") elseif(getCameraGoggleEffect() == "thermalvision")then setCameraGoggleEffect("normal") end end function showText() adv = guiCreateLabel(-0.00, 0.37, 0.18, 0.14, "Vision Normal press f", true) guiSetFont(adv, "default-bold-small") guiLabelSetHorizontalAlign(adv, "center", false) guiLabelSetVerticalAlign(adv, "center") end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function (resource) outputDebugString("* Resource name: "..getResourceName(resource).." | Version 1.0 |") end) as might i do so that when I change the vision way out other text guiCreateLabel adv = (-0.00, 0.37, 0.18, 0.14, "Vision Normal press f", true) different as night mode activated forgive my bad English
  13. Jacobob14

    help .. ?

    someone tells me that the script used to look shiny sea at night http://prntscr.com/2sx5od
  14. it's possible to create a ped and put it in a team
  15. already tried but does not show the level http://prntscr.com/2sqx1y
  16. local r,g,b = getPlayerNametagColor(player) local offset = (scale) * NAMETAG_TEXT_BAR_SPACE/2 local w = dxGetTextWidth(getPlayerNameR(player), textscale * NAMETAG_TEXTSIZE, srfont) / 2 dxDrawText ( getPlayerNameR(player), sx, sy - offset, sx, sy - offset, tocolor(0,0,0,255), textscale*NAMETAG_TEXTSIZE, srfont, "center", "bottom", false, false, false ) dxDrawColorText ( getPlayerName(player), sx-w, sy - offset, sx, sy - offset, tocolor(r,g,b,textalpha), textscale*NAMETAG_TEXTSIZE, srfont, "center", "bottom", false, false, false ) dxDrawText ( "nivel:".. tostring ( getElementData ( localPlayer, "level" ) ), sx, sy - offset, sx, sy - offset, tocolor(0,0,0,255), textscale*NAMETAG_TEXTSIZE, srfont, "center", "bottom", false, false, false ) dxDrawColorText ("nivel:".. tostring ( getElementData ( localPlayer, "level" ) ), sx-w, sy - offset, sx, sy - offset, tocolor(255,0,0,255), textscale*NAMETAG_TEXTSIZE, srfont, "center", "bottom", false, false, false ) local drawX = sx - NAMETAG_WIDTH*scale/2 drawY = sy + offset local width,height = NAMETAG_WIDTH*scale, NAMETAG_HEIGHT*scale dxDrawRectangle ( drawX, drawY, width, height, tocolor(0,0,0,50) ) I have a problem I want to see the level name on the nametag but instead of watching the level of the player is mine someone help me
  17. fadeCamera(false,0,0,0,0) delete line 15
  18. be can create a nick in the scoreboard of a player who does not exist as a bot if outside forgive my bad English
  19. wdwLogin_Pannel = {} tabPannel_Main = {} tab_Login = {} tab_Register = {} --Settings blackScreenTime = 0 --Time to complete disappearance of the black screen in seconds. GuestEnable = false--Can a Player play as Guest, or no. [true/false] function open_log_reg_pannel() if not(isElement(wdwLogin_Pannel)) then setCameraMatrix(1468, -919, 100) end local sWidth,sHeight = guiGetScreenSize() -- The variables local Width,Height = 473,284 --Ширина, Высота окна local X = (sWidth/2) - (Width/2) --Получение центра по X (По ширине экрана) local Y = (sHeight/2) - (Height/2) --Получение центра по Y (Высоте экрана) wdwLogin_Pannel = guiCreateWindow(X,Y,Width,Height,"Login Pannel",false) guiWindowSetSizable(wdwLogin_Pannel,false) tabPannel_Main = guiCreateTabPanel(9,23,455,251,false,wdwLogin_Pannel) tab_Login = guiCreateTab("Login",tabPannel_Main) lbl_Login = guiCreateLabel(103,72,42,19,"Login:",false,tab_Login) guiLabelSetVerticalAlign(lbl_Login,"center") guiLabelSetHorizontalAlign(lbl_Login,"right",false) guiSetFont(lbl_Login,"default-bold-small") edit_Login = guiCreateEdit(156,72,169,23,"",false,tab_Login) --Поле ввода логина edit_password = guiCreateEdit(156,106,169,23,"",false,tab_Login) --Поле ввода пароля guiEditSetMaxLength ( edit_Login,25) guiEditSetMaxLength ( edit_password,25) guiEditSetMasked ( edit_password, true ) lbl_Password = guiCreateLabel(48,106,96,19,"Password:",false,tab_Login) guiLabelSetVerticalAlign(lbl_Password,"center") guiLabelSetHorizontalAlign(lbl_Password,"right",false) guiSetFont(lbl_Password,"default-bold-small") lbl_top_info = guiCreateLabel(109,6,244,35,"Please write your username and password.",false,tab_Login) guiLabelSetColor(lbl_top_info,68,255,134) guiLabelSetVerticalAlign(lbl_top_info,"center") guiLabelSetHorizontalAlign(lbl_top_info,"center",false) lbl_about_legth = guiCreateLabel(142,42,184,18,"Max Length: 25 symbols",false,tab_Login) guiLabelSetColor(lbl_about_legth,253,255,68) guiLabelSetVerticalAlign(lbl_about_legth,"center") guiLabelSetHorizontalAlign(lbl_about_legth,"center",false) checkbox_save = guiCreateCheckBox(329,110,100,20,"(Save)",false,false,tab_Login) guiSetFont(checkbox_save,"default-small") btn_Login = guiCreateButton(164,162,147,41,"Login",false,tab_Login) guiSetFont(btn_Login,"default-bold-small") login_tab_error_msg = guiCreateLabel(31,131,419,25,"Error_login_tab",false,tab_Login) guiLabelSetColor(login_tab_error_msg,255,0,0) guiLabelSetVerticalAlign(login_tab_error_msg,"center") guiLabelSetHorizontalAlign(login_tab_error_msg,"center",false) guiSetFont(login_tab_error_msg,"default-bold-small") --Guest func if GuestEnable == true then btnGuest = guiCreateButton(29,168,94,32,"Play as Guest",false,tab_Login) guiSetFont(btnGuest,"default-small") guiSetVisible(btnGuest,true) else if isElement(btnGuest) then guiSetVisible(btnGuest,false) end btnGuest = nil end tab_Register = guiCreateTab("Register",tabPannel_Main) lbl_account_name = guiCreateLabel(43,39,119,21,"Account Name:",false,tab_Register) guiLabelSetVerticalAlign(lbl_account_name,"center") guiLabelSetHorizontalAlign(lbl_account_name,"right",false) guiSetFont(lbl_account_name,"default-bold-small") lbl_reg_top_info = guiCreateLabel(66,5,364,31,"Please, fill in all fields! (Don't use \"!@#$\"%'^&*()\")",false,tab_Register) guiLabelSetColor(lbl_reg_top_info,255,234,55) guiLabelSetVerticalAlign(lbl_reg_top_info,"center") guiLabelSetHorizontalAlign(lbl_reg_top_info,"center",false) edit_account_name = guiCreateEdit(172,40,176,23,"",false,tab_Register) guiEditSetMaxLength ( edit_account_name,25) lbl__reg_tab_password = guiCreateLabel(43,71,119,21,"Password:",false,tab_Register) guiLabelSetVerticalAlign(lbl__reg_tab_password,"center") guiLabelSetHorizontalAlign(lbl__reg_tab_password,"right",false) guiSetFont(lbl__reg_tab_password,"default-bold-small") edit__reg_tab_password = guiCreateEdit(172,71,176,23,"",false,tab_Register) guiEditSetMaxLength ( edit__reg_tab_password,25) edit__reg_tab_Repassword = guiCreateEdit(172,102,176,23,"",false,tab_Register) guiEditSetMaxLength ( edit__reg_tab_Repassword,25) lvl_reg_tab_Repassword = guiCreateLabel(43,102,119,21,"Repeat password:",false,tab_Register) guiLabelSetVerticalAlign(lvl_reg_tab_Repassword,"center") guiLabelSetHorizontalAlign(lvl_reg_tab_Repassword,"right",false) guiSetFont(lvl_reg_tab_Repassword,"default-bold-small") btn_reg_tab_register = guiCreateButton(153,161,174,42,"Confirm & register!",false,tab_Register) guiSetFont(btn_reg_tab_register,"default-bold-small") reg_tab_error_msg = guiCreateLabel(66,129,364,31,"Error_reg_ttab",false,tab_Register) guiLabelSetColor(reg_tab_error_msg,255,20,0) guiLabelSetVerticalAlign(reg_tab_error_msg,"center") guiLabelSetHorizontalAlign(reg_tab_error_msg,"center",false) guiSetFont(reg_tab_error_msg,"default-bold-small") guiSetVisible(wdwLogin_Pannel,true) --guiSetInputEnabled(true) showCursor(true) --Изменение надписей: guiSetText(reg_tab_error_msg, "") --Поле ошибки в Reg табе guiSetText(login_tab_error_msg, "") --Поле ошибки в Login табе local username, password = loadLoginFromXML() if not( username == "" or password == "") then guiCheckBoxSetSelected ( checkbox_save, true ) guiSetText ( edit_Login, tostring(username)) guiSetText ( edit_password, tostring(password)) else guiCheckBoxSetSelected ( checkbox_save, false ) guiSetText ( edit_Login, tostring(username)) guiSetText ( edit_password, tostring(password)) end --Эвенты addEventHandler("onClientGUIClick",btn_Login,onClickBtnLogin) addEventHandler("onClientGUIClick",btn_reg_tab_register,onClickBtnRegister) if GuestEnable == true then addEventHandler("onClientGUIClick",btnGuest,onClickGuest) end --else --destroyElement(wdwLogin_Pannel) --guiSetInputEnabled(false) --wdwLogin_Pannel = nil --showCursor(false) end end function start_cl_resource() --При старте open_log_reg_pannel() end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),start_cl_resource) function loadLoginFromXML() --Загрузка логина и пароля из XML local xml_save_log_File = xmlLoadFile ("files/xml/userdata.xml") if not xml_save_log_File then xml_save_log_File = xmlCreateFile("files/xml/userdata.xml", "login") end local usernameNode = xmlFindChild (xml_save_log_File, "username", 0) local passwordNode = xmlFindChild (xml_save_log_File, "password", 0) if usernameNode and passwordNode then return xmlNodeGetValue(usernameNode), xmlNodeGetValue(passwordNode) else return "", "" end xmlUnloadFile ( xml_save_log_File ) end function saveLoginToXML(username, password) --Сохрание логина и пароля в XML local xml_save_log_File = xmlLoadFile ("files/xml/userdata.xml") if not xml_save_log_File then xml_save_log_File = xmlCreateFile("files/xml/userdata.xml", "login") end if (username ~= "") then local usernameNode = xmlFindChild (xml_save_log_File, "username", 0) if not usernameNode then usernameNode = xmlCreateChild(xml_save_log_File, "username") end xmlNodeSetValue (usernameNode, tostring(username)) end if (password ~= "") then local passwordNode = xmlFindChild (xml_save_log_File, "password", 0) if not passwordNode then passwordNode = xmlCreateChild(xml_save_log_File, "password") end xmlNodeSetValue (passwordNode, tostring(password)) end xmlSaveFile(xml_save_log_File) xmlUnloadFile (xml_save_log_File) end addEvent("saveLoginToXML", true) addEventHandler("saveLoginToXML", getRootElement(), saveLoginToXML) function resetSaveXML() --Сохрание логина и пароля в XML local xml_save_log_File = xmlLoadFile ("files/xml/userdata.xml") if not xml_save_log_File then xml_save_log_File = xmlCreateFile("files/xml/userdata.xml", "login") end if (username ~= "") then local usernameNode = xmlFindChild (xml_save_log_File, "username", 0) if not usernameNode then usernameNode = xmlCreateChild(xml_save_log_File, "username") end end if (password ~= "") then local passwordNode = xmlFindChild (xml_save_log_File, "password", 0) if not passwordNode then passwordNode = xmlCreateChild(xml_save_log_File, "password") end xmlNodeSetValue (passwordNode, "") end xmlSaveFile(xml_save_log_File) xmlUnloadFile (xml_save_log_File) end addEvent("resetSaveXML", true) addEventHandler("resetSaveXML", getRootElement(), resetSaveXML) function onClickBtnLogin(button,state) --При нажатии на кнопку Login if(button == "left" and state == "up") then if (source == btn_Login) then username = guiGetText(edit_Login) password = guiGetText(edit_password) if guiCheckBoxGetSelected ( checkbox_save ) == true then checksave = true else checksave = false end triggerServerEvent("onRequestLogin",getLocalPlayer(),username,password,checksave) end
  20. Jacobob14

    help pls

    thanks works for me very well
  21. Jacobob14

    help pls

    I've tried it and the door does not open
  22. Jacobob14

    help pls

    thank you very much I have another question is possible that if the door is in motion can not close until the end of open or you can not open until the end of closing forgive my bad English
  23. Jacobob14

    help pls

    as I can do that by executing a command leave me in chat if the door is open or closed forgive my bad English this is the script I use local objeto1 = createObject ( 980, 1460.6999511719, 802.70001220703, 15.199999809265, 0, 0, 0) local state = false local objeto11 = createObject ( 980, 1441.4000244141, 802.70001220703, 15.199999809265, 0, 0, 0) local state = false function Funcion ( thePlayer ) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "|LTN|" ) ) then if ( not state ) then moveObject ( objeto1, 2000, 1460.6999511719, 802.70001220703, 22, 0, 0, 0) state = true moveObject ( objeto11, 2000, 1441.4000244141, 802.70001220703, 22, 0, 0, 0) state = true outputChatBox ( "#00bbff[base LTN] => #0000ffAbriendo #00ff00Entry", thePlayer, 255, 255, 255, true ) else moveObject ( objeto1, 2000, 1460.6999511719, 802.70001220703, 15.199999809265, 0, 0, 0) state = false moveObject ( objeto11, 2000, 1441.4000244141, 802.70001220703, 15.199999809265, 0, 0, 0) state = false outputChatBox ( "#00bbff[base LTN] => #0000ffCerrando #00ff00 Entry", thePlayer, 255, 255, 255, true ) end end end addCommandHandler ( "ltnentry", Funcion )
  24. what you want is that Paytime saved when entering and leaving the server ??
×
×
  • Create New...