TigreBlanco Posted December 25, 2012 Share Posted December 25, 2012 Hola, Creo que a Ustedes les Parecera un Resource un poco Novato, Pero ai es Donde Quiero Llegar a Saberlo para mi Server. 1. Quiero Poner un Punto de Respawn que Cuando el jugador Muera, Aparezca en Cualquiera de los Hospitales Aleatorios de San Andreas, Dependiendo de la Ciudad que Esten, Ej. las Verturas, Aparecera en uno de los Hospitales de Alli 2. Quiero que al Respawnear se les Queden las Armas, El Skin y el Dinero 3. Quiero que Cuando un Jugador Inicie el Juego, se Registre y se Loguee y Aparezca en el Aeropuerto de LS Sin Armas y con el Skin ID 123, Pero que Solo Pase 1 Vez Cuando se Registre, Cuando se Vuelva a loguear ya Tengo el Save_System 4. Quiero que me Expliquen un poco Sobre Como hacer unos Trabajos Como Medico, Policia, Criminal, Mecanico, Etc y utilizar el Resource House_System (Solo pido que me Expliquen ) El p-spawn no me Ayuda Mucho, Pero Aqui os lo Dejo de Ayuda (Le Quite el Punto de Spawn ya Que Intente Hacer Uno en Otro Script): -- Settings for when a player dies -- XYZ coördinates local spawnX = 2025.4608154297 local spawnY = -1422.4952392578 local spawnZ = 16.9921875 -- Weapon and ammo local spawnWeapon = 22 local spawnAmmo = 50 -- Skin that player gets local spawnSkin = 15 -- Settings for the amounts of money -- Money the killer gets local killerMoney = 500 -- Money removed from player when they die local deadPlayerMoney = 500 -- Functions -- This function spawns players after they died function spawnOnDead(ammo, killer, weapon, bodypart) takePlayerMoney(source, deadPlayerMoney) if (killer) and (killer ~= source) then givePlayerMoney(killer, killerMoney) end setTimer(spawnPlayer, 3000, 1, source, spawnX, spawnY, spawnZ, 0, spawnSkin) setCameraTarget(source, source) setTimer(giveWeapon, 3000, 1, source, spawnWeapon, spawnAmmo) end -- Event handlers addEventHandler("onPlayerWasted", getRootElement(), spawnOnDead) Si me Pudiera Ayudar Castillo me Emocionaria mucho Mi Ip del Server Hosteado en Vortex: 66.225.195.166:22005 Nombre: Juramento Freeroam (Esta reabierto ) Link to comment
Arsilex Posted December 25, 2012 Share Posted December 25, 2012 local spawnV = { { 255.52216, 255.324234, 0 }, { 255.52216, 255.324234, 0 }, { 255.52216, 255.324234, 0 } } local spawnL = { { 255.52216, 255.324234, 0 }, { 255.52216, 255.324234, 0 }, { 255.52216, 255.324234, 0 } } local spawnF = { { 255.52216, 255.324234, 0 }, { 255.52216, 255.324234, 0 }, { 255.52216, 255.324234, 0 } } addEventHandler( "onPlayerWasted", getRootElement(), function() local x, y, z = getElementPosition ( source ) local city = getZoneName ( x, y, z, true ) if city == "Las Vegas" then spawnPlayer ( source, unpack ( spawnV[ math.random ( #spawnV ) ] ) ) elseif city == "San Fierro" spawnPlayer ( source, unpack ( spawnF[ math.random ( #spawnF ) ] ) ) else spawnPlayer ( source, unpack ( spawnL[ math.random ( #spawnL ) ] ) ) end end ) no eh comprobado pero creo que con esto sirve para la primera pregunta. Link to comment
Castillo Posted December 25, 2012 Share Posted December 25, 2012 2: Podes crear una tabla temporal y al morir poner los datos ( armas, skin, etc ), y al spawnear se los das. 3: Podes guardar una data especial y al loguearte, verificas si la tiene, y si no, le das el skin 123, y lo spawneas en el aeropuerto. Link to comment
Arsilex Posted December 25, 2012 Share Posted December 25, 2012 castillo mi respuesta esta bien? Link to comment
Castillo Posted December 25, 2012 Share Posted December 25, 2012 El unico problema sera con las no-ciudades. Link to comment
Arsilex Posted December 25, 2012 Share Posted December 25, 2012 mmm pensare en eso e.e PD: se pondria hacer con 3 colshape de esos e.e no? Link to comment
TigreBlanco Posted December 25, 2012 Author Share Posted December 25, 2012 2: Podes crear una tabla temporal y al morir poner los datos ( armas, skin, etc ), y al spawnear se los das.3: Podes guardar una data especial y al loguearte, verificas si la tiene, y si no, le das el skin 123, y lo spawneas en el aeropuerto. No Entiendo Como se Hace Eso lo de la Tabla Temporal Etc, el Punto de Spawn Principal lo Puedo Usar el de p-spawn, me falta saber lo de el respawn con armas, y por favor me puedes explicar algo sobre los trabajos y house_system Link to comment
Castillo Posted December 25, 2012 Share Posted December 25, 2012 Simplemente creas una tabla y al morir obtenes los datos del jugador y los guardas dentro con su userdata como index. Link to comment
TigreBlanco Posted December 25, 2012 Author Share Posted December 25, 2012 local spawnV = { { 255.52216, 255.324234, 0 }, { 255.52216, 255.324234, 0 }, { 255.52216, 255.324234, 0 } } local spawnL = { { 255.52216, 255.324234, 0 }, { 255.52216, 255.324234, 0 }, { 255.52216, 255.324234, 0 } } local spawnF = { { 255.52216, 255.324234, 0 }, { 255.52216, 255.324234, 0 }, { 255.52216, 255.324234, 0 } } addEventHandler( "onPlayerWasted", getRootElement(), function() local x, y, z = getElementPosition ( source ) local city = getZoneName ( x, y, z, true ) if city == "Las Vegas" then spawnPlayer ( source, unpack ( spawnV[ math.random ( #spawnV ) ] ) ) elseif city == "San Fierro" spawnPlayer ( source, unpack ( spawnF[ math.random ( #spawnF ) ] ) ) else spawnPlayer ( source, unpack ( spawnL[ math.random ( #spawnL ) ] ) ) end end ) no eh comprobado pero creo que con esto sirve para la primera pregunta. No Sirve me salta Error Link to comment
TigreBlanco Posted December 25, 2012 Author Share Posted December 25, 2012 Simplemente creas una tabla y al morir obtenes los datos del jugador y los guardas dentro con su userdata como index. No Entiendo como se Crea esa tambla D: Link to comment
Arsilex Posted December 25, 2012 Share Posted December 25, 2012 local spawnV = { { 255.52216, 255.324234, 0 }, { 255.52216, 255.324234, 0 }, { 255.52216, 255.324234, 0 } } local spawnL = { { 1922.7138671875, -2300.3759765625, 13.546875 }, { 2708.5712890625, -1740, 42.133285522461 }, { 1140, -1474.28515625, 15.796875 } } local spawnF = { { 255.52216, 255.324234, 0 }, { 255.52216, 255.324234, 0 }, { 255.52216, 255.324234, 0 } } addEventHandler( "onPlayerWasted", getRootElement(), function() local x, y, z = getElementPosition ( source ) local city = getZoneName ( x, y, z, true ) if city == "Las Venturas" then setTimer( spawnPlayer, 2000, 1, source, unpack ( spawnV[ math.random ( #spawnV ) ] ) ) fadeCamera (source, true) setCameraTarget (source, source) elseif city == "San Fierro" then setTimer( spawnPlayer, 2000, 1, source, unpack ( spawnF[ math.random ( #spawnF ) ] ) ) fadeCamera (source, true) setCameraTarget (source, source) elseif city == "Los Santos" then setTimer( spawnPlayer, 2000, 1, source, unpack ( spawnL[ math.random ( #spawnL ) ] ) ) fadeCamera (source, true) setCameraTarget (source, source) else setTimer( spawnPlayer, 2000, 1, source, unpack ( spawnL[ math.random ( #spawnL ) ] ) ) fadeCamera (source, true) setCameraTarget (source, source) end end ) ahora si funciona Link to comment
Recommended Posts