Jump to content

DefearT

Members
  • Posts

    120
  • Joined

  • Last visited

Everything posted by DefearT

  1. DefearT

    Ayuda!

    Buenas noches, me podrian explicar como poner luces a los autos con el respectivo color del team, me explico! Que las luces sean del mismo color que el team o que yo asigne, algo que pudiera usar para varias team. Como podria crear esto?
  2. Gracias, te lo agradesco.
  3. Gracias por eso, pero estoy creando un server en otro modo de juego que no es freeroam, ni race, nada es algo que en lo que estoy trabajando, como podria lo que te mencione anteriormente?
  4. Si, lo que quiero hacer un sistema que eh visto en varios servers YA! Como por ejemplo: [GLOBAL] , [LOCAL], [RADIO]!
  5. Ayuda, quiero utilizar el chat de modo local, yo se que hay resources para eso en la comunidad, pero cuando les doy start y por lo menos yo hablo por chat me sale duplicado el mensaje en chatbox
  6. Hola, bueno aqui les consulto si me pueden ayudar con lo que es GUI, ya que soy muy malo y no entiendo nada al hacer un Login Panel yo estaba haciendo uno y como no se programarlo me copie de un login aver si me funcionaba pero nada, no me funciona :C PD:No me aparece el GUI en pantalla... Aqui el Lua aver si me pueden ayudar y decirme cuales son los errores: Client --Settings blackLoginScreen = true --True/false Black screen, while player login... blackScreenTime = 5 --Time to complete disappearance of the black screen in seconds. GuestEnable = true --Can a Player play as Guest, or no. [true/false] function sx_login() if not(isElement(wLogin_Panel)) then if blackLoginScreen == true then fadeCamera(false,0,0,0,0) end local sWidth,sHeight = guiGetScreenSize() local Width,Height = 473,284 local X = (sWidth/2) - (Width/2) local Y = (sHeight/2) - (Height/2) wLogin_Panel = guiCreateWindow(151, 112, 517, 344, "SX - Login Panel", false) guiWindowSetMovable(wLogin_Panel, false) guiWindowSetSizable(wLogin_Panel, false) tabLogin_Panel = guiCreateTabPanel(231, 101, 276, 233, false, wLogin_Panel) tab_Update = guiCreateTab("Updates", tagLogin_Panel) memo_update = guiCreateMemo(4, 4, 268, 201, "Update - 19/06/13\n *Login Panel SX\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n", false, tab_Update) guiMemoSetReadOnly(memo_update, true) lab_visit = guiCreateLabel(387, 90, 120, 16, "Visit the page official:", false, wLogin_Panel) lab_web = guiCreateLabel(328, 106, 179, 16, "http://sxg-commnunity.com.nu/", false, wLogin_Panel) guiLabelSetColor(lab_web, 255, 0, 0) tab_LogPanel = guiCreateTabPanel(10, 82, 211, 252, false, wLogin_Panel) tab_Login = guiCreateTab("Log in", tab_LogPanel) lab_Log = guiCreateLabel(90, 10, 37, 17, "Login:", false, tab_Login) edit_Log = guiCreateEdit(29, 32, 157, 24, "", false, tab_Login) guiEditSetMaxLength(edit_Log, 25) lab_Pass = guiCreateLabel(80, 66, 57, 15, "Password:", false, tab_Login) edit_Pass = guiCreateEdit(30, 87, 157, 24, "", false, tab_Login) guiEditSetMaxLength(edit_Pass, 25) guiEditSetMasked(edit_Pass, true) btn_Login = guiCreateButton(49, 129, 121, 49, "Login", false, tab_Login) checkbox_save = guiCreateCheckBox(5, 203, 16, 18, "Save", false, false, tab_Login) --Guest func if GuestEnable == true then btn_Guest = guiCreateButton(135, 195, 66, 22, "Guest", false, tab_Login) guiSetVisible(btn_Guest,true) else if isElement(btn_Guest) then guiSetVisible(btn_Guest,false) end btn_Guest = nil end tab_Reg = guiCreateTab("Register", tab_RegPanel) lab_Rlog = guiCreateLabel(61, 20, 84, 17, "Account Name:", false, tab_Reg) edit_Rlog = guiCreateEdit(35, 37, 136, 21, "", false, tab_Reg) guiEditSetMaxLength(edit_Rlog, 25) lab_Rpass = guiCreateLabel(77, 64, 53, 17, "Password:", false, tab_Reg) edit_Rpass = guiCreateEdit(35, 81, 136, 21, "", false, tab_Reg) guiEditSetMaxLength(edit_Rpass, 25) guiEditSetMasked(edit_Pass, true) lab_Rrpass = guiCreateLabel(55, 108, 99, 15, "Repeat Password:", false, tab_Reg) edit_Rrpass = guiCreateEdit(35, 123, 136, 21, "", false, tab_Reg) guiEditSetMaxLength(edit_Rrpass, 25) guiEditSetMasked(edit_Pass, true) btn_Register = guiCreateButton(25, 162, 161, 42, "¬°Confirm & Register!", false, tab_Reg) guiSetVisible(wLogin_Panel,true) --guiSetInputEnabled(true) showCursor(true) local username, password = loadLoginFromXML() if not( username == "" or password == "") then guiCheckBoxSetSelected ( checkbox_save, true ) guiSetText ( edit_Log, tostring(username)) guiSetText ( edit_Pass, tostring(password)) else guiCheckBoxSetSelected ( checkbox_save, false ) guiSetText ( edit_Log, tostring(username)) guiSetText ( edit_Pass, tostring(password)) end addEventHandler("onClientGUIClick",btn_Login,onClickBtnLogin) addEventHandler("onClientGUIClick",btn_Register,onClickBtnRegister) if GuestEnable == true then addEventHandler("onClientGUIClick",btn_Guest,onClickGuest) end end end function start-resourcer() sx_login() end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),start-resourcer) function loadLoginFromXML() 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) 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() 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) if(button == "left" and state == "up") then if (source == btn_Login) then username = guiGetText(edit_Login) password = guiGetText(edit_Pass) if guiCheckBoxGetSelected ( checkbox_save ) == true then checksave = true else checksave = false end triggerServerEvent("onRequestLogin",getLocalPlayer(),username,password,checksave) end end end function onClickBtnRegister(button,state) if(button == "left" and state == "up") then if (source == btn_Register) then username = guiGetText(edit_Rlog) password = guiGetText(edit_Rpass) passwordConfirm = guiGetText(edit_Rrpass) triggerServerEvent("onRequestRegister",getLocalPlayer(),username,password,passwordConfirm) end end end function onClickGuest(button,state) if(button == "left" and state == "up") then if (source == btn_Guest) then guiSetVisible(wLogin_Panel, false) guiSetInputEnabled(false) showCursor(false) if blackLoginScreen == true then fadeCamera(true,blackScreenTime) end end end end function hideLoginWindow() guiSetInputEnabled(false) guiSetVisible(wLogin_Panel, true) destroyElement(wLogin_Panel) wLogin_Panel = nil showCursor(false) removeEventHandler("onClientGUIClick",btn_Login,onClickBtnLogin) if GuestEnable == true then removeEventHandler("onClientGUIClick",btn_Guest,onClickGuest) end if blackLoginScreen == true then fadeCamera(true,blackScreenTime) end end addEvent("hideLoginWindow", true) addEventHandler("hideLoginWindow", getRootElement(), hideLoginWindow) Server: function PlayerLogin(username,password,checksave) if not (username == "") then if not (password == "") then local account = getAccount ( username, password ) if ( account ~= false ) then logIn(source, account, password) triggerClientEvent (source,"hideLoginWindow",getRootElement()) if checksave == true then triggerClientEvent(source,"saveLoginToXML",getRootElement(),username,password) else triggerClientEvent(source,"resetSaveXML",getRootElement(),username,password) end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Login","Wrong username and/or password!") end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Login","Please enter your password!") end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Login","Please enter your username!") end end addEvent("onRequestLogin",true) addEventHandler("onRequestLogin",getRootElement(),PlayerLogin) function registerPlayer(username,password,passwordConfirm) if not (username == "") then if not (password == "") then if not (passwordConfirm == "") then if password == passwordConfirm then local account = getAccount (username,password) if (account == false) then local accountAdded = addAccount(tostring(username),tostring(password)) if (accountAdded) then outputChatBox ("#FF0000* #00FF00You have sucessfuly registered! [username: #FFFFFF" .. username .. " #00FF00| Password: #FFFFFF" .. password .. "#00FF00 ]",source,255,255,255,true ) else triggerClientEvent(source,"set_warning_text",getRootElement(),"Register","An unknown error has occured! Please choose a different username/password and try again.") end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Register","An account with this username already exists!") end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Register","Passwords do not match!") end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Register","Please confirm your password!") end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Register","Please enter a password!") end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Register","Please enter a username you would like to register with!") end end addEvent("onRequestRegister",true) addEventHandler("onRequestRegister",getRootElement(),registerPlayer)
  7. La fuente la empese de la comunidad hay un resource de bloquear los vehiculos y ps y empese con la musica que cuando estubieran abriendola y esta bloqueado ps sonara la musica pero no se si funciona, pruebalo aver que tal..
  8. Este es el Client-Side localPlayer = getLocalPlayer ( ) addEvent ( "onPlaySoundNearElement", true ) function playSoundNearElement ( theElement, sound ) local maxdist = 15.0 if ( theElement ) then local x,y,z = getElementPosition ( theElement ) local x2,y2,z2 = getElementPosition ( localPlayer ) local dist = getDistanceBetweenPoints3D ( x, y, z, x2, y2, z2 ) if ( dist < maxdist ) then playSoundFrontEnd ( 5 ) else end else end end addEventHandler ( "onPlaySoundNearElement", getRootElement(), playSoundNearElement ) addEvent("prendeAlarma",true) Alarmas = {} function alarmita(auto) local x,y,z = getElementPosition(auto) Alarmas[auto] = playSound3D("alarm.wav",x,y,z,true) attachElements(Alarmas[auto],auto) setSoundMaxDistance(Alarmas[auto],20) setSoundVolume(Alarmas[auto],2) end addEventHandler ("prendeAlarma", getRootElement(), alarmita) addEvent("apagaAlarma",true) function apagame(auto) stopSound(Alarmas[auto]) end addEventHandler("apagaAlarma",getRootElement(), apagame) addEvent("AlarmaCulia",true) function apagatectm() for k,v in pairs(Alarmas) do if(not isElement( k )) then stopSound(v); Alarmas[k] = nil; end end end addEventHandler("AlarmaCulia", getRootElement(), apagatectm) Y este el Server-Side function initCarLocks () local players = getElementsByType ( "player" ) for k,p in ipairs(players) do removeElementData ( p, "cl_ownedvehicle" ) bindKey ( p, "l", "down", doToggleLocked ) end local vehicles = getElementsByType ( "vehicle" ) for k,v in ipairs(vehicles) do removeElementData ( v, "cl_vehicleowner" ) removeElementData ( v, "cl_vehiclelocked" ) setVehicleLocked ( v, false ) end end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), initCarLocks ) addEventHandler ( "onResourceStop", getResourceRootElement ( getThisResource () ), initCarLocks ) function cl_PlayerJoin ( ) bindKey ( source, "l", "down", doToggleLocked ) end addEventHandler ( "onPlayerJoin", getRootElement(), cl_PlayerJoin ) function cl_PlayerQuit ( ) local ownedVehicle = getElementData ( source, "cl_ownedvehicle" ) if (ownedVehicle ~= false) then cl_RemoveVehicleOwner ( ownedVehicle ) end end addEventHandler ( "onPlayerQuit", getRootElement(), cl_PlayerQuit ) function cl_PlayerWasted ( ) local ownedVehicle = getElementData ( source, "cl_ownedvehicle" ) if (ownedVehicle ~= false) then cl_RemoveVehicleOwner ( ownedVehicle ) end end addEventHandler ( "onPlayerWasted", getRootElement(), cl_PlayerWasted ) function cl_VehicleStartEnter ( enteringPlayer, seat, jacked ) local theVehicle = source local theOwner if ( getElementData ( theVehicle, "cl_vehiclelocked" ) == true ) then theOwner = getElementData ( theVehicle, "cl_vehicleowner" ) if theOwner ~= false and theOwner ~= enteringPlayer then end end end addEventHandler ( "onVehicleStartEnter", getRootElement(), cl_VehicleStartEnter ) function cl_PlayerDriveVehicle ( player, seat, jacked ) if ( seat == 0 ) then oldVehicle = getElementData ( player, "cl_ownedvehicle" ) if ( (cl_VehicleLocked(source) == true) and (cl_VehicleOwner(source) ~= player) ) then removePedFromVehicle( player ) Err_Msg("This vehicle is locked.", player) return false end cl_SetVehicleOwner ( source, player ) end return true end addEventHandler ( "onVehicleEnter", getRootElement(), cl_PlayerDriveVehicle ) function cl_VehicleRespawn ( exploded ) cl_RemoveVehicleOwner ( source ) end addEventHandler ( "OnVehicleRespawn", getRootElement(), cl_VehicleRespawn ) function cl_VehicleExplode ( ) local theOwner = getElementData ( source, "cl_vehicleowner" ) if ( theOwner ~= false ) then cl_RemoveVehicleOwner ( source ) end end addEventHandler ( "onVehicleExplode", getRootElement(), cl_VehicleExplode ) function cl_SetVehicleOwner ( theVehicle, thePlayer ) local oldVehicle = getElementData ( thePlayer, "cl_ownedvehicle" ) if ( oldVehicle ~= false ) then removeElementData ( oldVehicle, "cl_vehicleowner" ) removeElementData ( oldVehicle, "cl_vehiclelocked" ) setVehicleLocked ( oldVehicle, false ) end setElementData ( theVehicle, "cl_vehicleowner", thePlayer ) setElementData ( theVehicle, "cl_vehiclelocked", false ) setElementData ( thePlayer, "cl_ownedvehicle", theVehicle ) end function cl_RemoveVehicleOwner ( theVehicle ) local theOwner = getElementData ( theVehicle, "cl_vehicleowner" ) if ( theOwner ~= false ) then removeElementData ( theOwner, "cl_ownedvehicle" ) removeElementData ( theVehicle, "cl_vehicleowner" ) removeElementData ( theVehicle, "cl_vehiclelocked" ) end setVehicleLocked ( theVehicle, false ) end function cl_FlashLights ( thePlayer ) setTimer ( doToggleLights, 300, 4, thePlayer, true ) end function cl_FlashOnce ( thePlayer ) setTimer ( doToggleLights, 300, 2, thePlayer, true ) end function cl_VehicleOwner ( theVehicle ) return getElementData( theVehicle, "cl_vehicleowner" ) end function cl_VehicleLocked ( theVehicle ) return getElementData( theVehicle, "cl_vehiclelocked" ) end function Err_Msg ( strout, thePlayer ) outputChatBox ( strout, thePlayer, 200, 0, 10 ) end function Car_Msg ( strout, theVehicle ) numseats = getVehicleMaxPassengers ( theVehicle ) for s = 0, numseats do local targetPlayer = getVehicleOccupant ( theVehicle, s ) if targetPlayer ~= false then outputChatBox ( strout, targetPlayer, 30, 144, 255 ) end end end function Info_Msg ( strout, thePlayer ) outputChatBox ( strout, thePlayer, 102, 205, 170 ) end function doToggleLocked ( source ) local theVehicle , strout if ( getElementType(source) == "vehicle" ) then theVehicle = source end if ( getElementType(source) == "player" ) then theVehicle = getElementData ( source, "cl_ownedvehicle" ) end if ( theVehicle ) then local vehiclename = getVehicleName ( theVehicle ) if ( getElementData ( theVehicle, "cl_vehiclelocked") == true ) then doUnlockVehicle ( source ) else doLockVehicle ( source ) end else Err_Msg("You must have a vehicle to lock or unlock it.", source) end end function doLockVehicle ( source ) local theVehicle , strout if ( getElementType(source) == "vehicle" ) then theVehicle = source end if ( getElementType(source) == "player" ) then theVehicle = getElementData ( source, "cl_ownedvehicle" ) end if ( theVehicle ) then local vehiclename = getVehicleName ( theVehicle ) if ( getElementData ( theVehicle, "cl_vehiclelocked") == true ) then strout = "Your " .. vehiclename .. " is already locked." Err_Msg(strout, source) else setElementData ( theVehicle, "cl_vehiclelocked", true) setVehicleLocked ( theVehicle, true ) Car_Msg( "Current vehicle " .. vehiclename .. " locked.", theVehicle) Info_Msg ( "Locked vehicle " .. vehiclename .. ".", source ) if ( getVehicleController ( theVehicle ) == false ) then cl_FlashLights ( source ) end end else Err_Msg("You must have a vehicle to lock it.", source) end end function doUnlockVehicle ( source ) local theVehicle, strout if ( getElementType(source) == "vehicle" ) then theVehicle = source end if ( getElementType(source) == "player" ) then theVehicle = getElementData ( source, "cl_ownedvehicle" ) end if ( theVehicle ) then local vehiclename = getVehicleName ( theVehicle ) if ( getElementData ( theVehicle, "cl_vehiclelocked") == false ) then strout = "Your " .. vehiclename .. " is already unlocked." Err_Msg(strout, source) else setElementData ( theVehicle, "cl_vehiclelocked", false) setVehicleLocked ( theVehicle, false ) Car_Msg( "Current vehicle " .. vehiclename .. " unlocked.", theVehicle ) Info_Msg ( "Unlocked vehicle " .. vehiclename .. ".", source ) if ( getVehicleController ( theVehicle ) == false ) then cl_FlashOnce ( source ) end end else Err_Msg("You must have a vehicle to unlock it.", source) end end function doToggleLights ( source, beep ) local theVehicle if ( getElementType(source) == "vehicle" ) then theVehicle = source end if ( getElementType(source) == "player" ) then theVehicle = getElementData ( source, "cl_ownedvehicle" ) end if ( theVehicle ) then if ( getVehicleOverrideLights ( theVehicle ) ~= 2 ) then setVehicleOverrideLights ( theVehicle, 2 ) if ( beep == true ) then local theElement = theVehicle triggerClientEvent ( getRootElement(), "onPlaySoundNearElement", getRootElement(), theElement, 5) end else setVehicleOverrideLights ( theVehicle, 1 ) end else Err_Msg("You must have a vehicle to control the lights.", source ) end end addCommandHandler ( "lock", doLockVehicle ) addCommandHandler ( "unlock", doUnlockVehicle ) Espero que lo puedas hacer algo aver si te funciona, PD: Nunca lo eh provado..
  9. Creo que lo que se refiere es a que cuando alguien ose, cual quiere player intente entrar en el vehiculo suene el archivo .wav, creo que aun tengo un archivo que lo estaba haciendo algo parecido pero no lo eh terminado, te lo dejo aver que puedes hacer..
  10. Mmm ok ya, yo siempre pense que ese radial era para quitar solo 1 objeto, no sabia que era para borrar todos los que este en ese radio.
  11. A eso me refiero, si pones 10000 como puso ElMota, po supuesto que se pierde el piso.
  12. DefearT

    Como puedo?

    Bueno de todas maneras gracias por su ayuda.
  13. DefearT

    Como puedo?

    Si esactamente asi! Que cuando se active ese comando en el mapa aparesca eso! Como se podra hacer..?
  14. Mota; de todas maneras si solo quieres quitar una reja, tienes que ponerle en radial, 2000 minimo es para que sea un solo objeto, si le pones 10000, por supuesto que se te desaparece el suelo.
  15. DefearT

    Como puedo?

    Ninguna "Mata" es "Mapa" Y no se le podra poner una imagen cuando se active el comando y se ponga F11 Salga? *-*
  16. DefearT

    Como puedo?

    No Matty; entendistes mal, lo del poner un mensaje en el chat eso lo se, es lo basico no? ^^ Pero no, yo quiero que cuando se active, al precionar F11 "Mapa" Aparesca en ese Mapa Unas flechas o algo indicando que deben ir a Chilliand.
  17. DefearT

    Como puedo?

    Hola, como puedo hacer que cuando se active un comando, por ejemplo, el de WaterLevel! Y empiese a crecer el agua, se ponga en el mata que vallan para MountChillian. ?
  18. Gracias solid, pude hacer lo del setTraindDerailable.
  19. @Title para que el Tren no se descarrile de las vias, tambien como agregarle al freight su bagon de carga o algun otro..
  20. DefearT

    Panel

    Para que puedas abir el panel, tienes que ponerle las funciones al boton para que se pueda abrir, si no le pones el nombre de la funcion al boton como piensas que se abrira.
  21. Asi esta! EL script, y si mejor invento algo mejor? No se podra usar el chaleco(armor) para la infeccion? Me refiero a que cada vez que los zombies ataken al jugador le den armor y le quiten la vida porsupuesto, pero al reves para que cuando el armor llege a 100 se combierta en zombie... Creo que es mas facil??? teamzombie = createTeam ( "Zombie", 250, 0, 0 ) function rewardOnWasted ( attacker, attackerweapon, bodypart, loss ) if(attackerweapon == 0) and getElementData(attacker,"zombie") then if not getElementData (source,"zombie") then givePlayerMoney ( attacker, 5000 ) setElementData ( source, "zombie", true ) Skin = getElementModel ( source ) setPlayerTeam ( source, teamzombie ) setPedSkin ( source, 13 ) setPedHeadless ( source, false ) end end end addEventHandler ( "onPlayerDamage", getRootElement(), rewardOnWasted ) infection = createPickup (2577.66, 2841.528, 10.82, 3, 1242, 15000 ) function infected ( thePlayer ) setPlayerTeam ( thePlayer, teamzombie ) setPedSkin ( thePlayer, 13 ) setPedHeadless ( thePlayer, false ) setElementData ( thePlayer, "zombie", true ) end addEventHandler ( "onPickupUse", infection, infected ) cure = createPickup (2572.37, 2841.50, 10.82, 3, 1240, 15000 ) function cured ( thePlayer ) setElementModel ( thePlayer,Skin ) setPedHeadless ( thePlayer, false ) setElementData ( thePlayer, "zombie", false ) end addEventHandler ( "onPickupUse", cure, cured )
  22. el debug me dice que setElementModel es un mal argumento @
  23. Si lo puse mira: Y como hacer para que cuando tome la cure regrese tambien a su team.. es casi lo mismo creoo? teamzombie = createTeam ( "Zombie", 250, 0, 0 ) function rewardOnWasted ( attacker, attackerweapon, bodypart, loss ) if(attackerweapon == 0) and getElementData(attacker,"zombie") then if not getElementData (source,"zombie") then givePlayerMoney ( attacker, 5000 ) setElementData ( source, "zombie", true ) Skin = getElementModel ( thePlayer ) setPlayerTeam ( source, teamzombie ) setPedSkin ( source, 13 ) setPedHeadless ( source, false ) end end end addEventHandler ( "onPlayerDamage", getRootElement(), rewardOnWasted ) infection = createPickup (2577.66, 2841.528, 10.82, 3, 1242, 15000 ) function infected ( thePlayer ) setPlayerTeam ( thePlayer, teamzombie ) setPedSkin ( thePlayer, 13 ) setPedHeadless ( thePlayer, false ) setElementData ( thePlayer, "zombie", true ) end addEventHandler ( "onPickupUse", infection, infected ) cure = createPickup (2572.37, 2841.50, 10.82, 3, 1240, 15000 ) function cured ( thePlayer ) setElementModel ( thePlayer,Skin ) setPedHeadless ( thePlayer, false ) setElementData ( thePlayer, "zombie", false ) end addEventHandler ( "onPickupUse", cure, cured )
  24. No aun sigue igual, solo que esta vez no cambio ni al de cj! teamzombie = createTeam ( "Zombie", 250, 0, 0 ) function rewardOnWasted ( attacker, attackerweapon, bodypart, loss ) if(attackerweapon == 0) and getElementData(attacker,"zombie") then if not getElementData (source,"zombie") then givePlayerMoney ( attacker, 5000 ) setElementData ( source, "zombie", true ) Skin = getElementModel ( thePlayer ) setPlayerTeam ( source, teamzombie ) setPedSkin ( source, 13 ) setPedHeadless ( source, false ) end end end addEventHandler ( "onPlayerDamage", getRootElement(), rewardOnWasted ) infection = createPickup (2577.66, 2841.528, 10.82, 3, 1242, 15000 ) function infected ( thePlayer ) setPlayerTeam ( thePlayer, teamzombie ) setPedSkin ( thePlayer, 13 ) setPedHeadless ( thePlayer, false ) setElementData ( thePlayer, "zombie", true ) end addEventHandler ( "onPickupUse", infection, infected ) cure = createPickup (2572.37, 2841.50, 10.82, 3, 1240, 15000 ) function cured ( thePlayer ) setElementModel ( thePlayer,Skin ) setPedHeadless ( thePlayer, false ) setElementData ( thePlayer, "zombie", false ) end addEventHandler ( "onPickupUse", cure, cured )
  25. Ok; asi? teamzombie = createTeam ( "Zombie", 250, 0, 0 ) function rewardOnWasted ( attacker, attackerweapon, bodypart, loss ) if(attackerweapon == 0) and getElementData(attacker,"zombie") then if not getElementData (source,"zombie") then givePlayerMoney ( attacker, 5000 ) setElementData ( source, "zombie", true ) setPlayerTeam ( source, teamzombie ) setPedSkin ( source, 13 ) setPedHeadless ( source, false ) end end end addEventHandler ( "onPlayerDamage", getRootElement(), rewardOnWasted ) Skin = getElementModel ( thePlayer ) infection = createPickup (2577.66, 2841.528, 10.82, 3, 1242, 15000 ) function infected ( thePlayer ) setPlayerTeam ( thePlayer, teamzombie ) setPedSkin ( thePlayer, 13 ) setPedHeadless ( thePlayer, false ) setElementData ( thePlayer, "zombie", true ) end addEventHandler ( "onPickupUse", infection, infected ) cure = createPickup (2572.37, 2841.50, 10.82, 3, 1240, 15000 ) function cured ( thePlayer ) setElementModel ( thePlayer,Skin ) setPedHeadless ( thePlayer, false ) setElementData ( thePlayer, "zombie", false ) end addEventHandler ( "onPickupUse", cure, cured )
×
×
  • Create New...