Jump to content

spawn 50p + script shooter ( spawnpoint )


PhantomDamn

Recommended Posts

Posted

hola quisiera saber si con el spawn de 50p puedo crear una categoria ejemplo "Shooter" que al entrar a unos de los team de cierta categoria haga spawnpoin en un auto directamente...

|El Sabio no tiene intereses propios, hace suyos los intereses del pueblo|

(scripting= -20%)

n-560x95_2B9E08_0AFA4E_000000_030000.png

Posted

le corrigo al primer post que me respondio para que sepa que es la seccion español.. y como lo hago?

|El Sabio no tiene intereses propios, hace suyos los intereses del pueblo|

(scripting= -20%)

n-560x95_2B9E08_0AFA4E_000000_030000.png

Posted

Porque no probas con esto?

  
vehicle = createVehicle ( id, x, y, z  ) 
  
function addPlayerToVehicle( source ) 
local team = getTeamFromName ( "NOMBRE DEL TEAM" ) 
if team then 
setElementPosition ( vehicle ) 
end 
end 
addEventHandler ( "onPlayerSpawn", getElementRoot(), addPlayerToVehicle ) 

Decime si esta bien, aunque no creo que deba usar ese setElementPosition pero no se cual otra funcion hay, probalo..

Posted
addEventHandler ( "onPlayerSpawn", getRootElement(), 
function ( source ) 
if ( getPlayerTeam(source) == "Nombre del Team" ) then 
   local x, y, z = getElementPosition(source) 
   local carro = createVehicle ( id, x, y, z  + 10) 
   warpPedIntoVehicle(source, carro) 
 end 
end) 

bandera_de_Venezuela.png

Posted
addEventHandler ( "onPlayerSpawn", getRootElement(), 
function ( source ) 
if ( getPlayerTeam(source) == "Nombre del Team" ) then 
   local x, y, z = getElementPosition(source) 
   local carro = createVehicle ( id, x, y, z  + 10) 
   warpPedIntoVehicle(source, carro) 
 end 
end) 

Tienes dos errores, 'getPlayerTeam' no devuelve un 'string' y 'source' no debe ir en la función, tambien te aconsejo usar root en vez de 'getRootElement'.

Developer @ MYVAL

Posted

Ami me parece que esta Bien, y seria lo mismo source que thePlayer y root es lo mismo que getRootElement(), :) pero bueno como quieras:

addEventHandler ( "onPlayerSpawn", getRootElement(), 
function ( thePlayer ) 
local teamaa = getPlayerTeam(thePlayer) 
if ( teamaa  == "Nombre del Team" ) then 
   local x, y, z = getElementPosition(thePlayer) 
   local carro = createVehicle ( id, x, y, z  + 10) 
   warpPedIntoVehicle(thePlayer, carro) 
 end 
end) 

bandera_de_Venezuela.png

Posted
Ami me parece que esta Bien, y seria lo mismo source que thePlayer y root es lo mismo que getRootElement(), :) pero bueno como quieras:
addEventHandler ( "onPlayerSpawn", getRootElement(), 
function ( thePlayer ) 
local teamaa = getPlayerTeam(thePlayer) 
if ( teamaa  == "Nombre del Team" ) then 
   local x, y, z = getElementPosition(thePlayer) 
   local carro = createVehicle ( id, x, y, z  + 10) 
   warpPedIntoVehicle(thePlayer, carro) 
 end 
end) 

Casi los mismos errores: 'thePlayer' es un 'float', no un jugador; 'teamaa' es un 'team', no un 'string' y 'getRootElement' consume mas que root, cosa que en el lado del servidor debería preocuparte.

Developer @ MYVAL

Posted

Intenta :/

addEventHandler ( "onPlayerSpawn", getRootElement(), 
function ( source ) 
local teams =  getPlayerTeam(source) 
if (getTeamName(teams)  == "Nombre del Team" ) then 
   local x, y, z = getElementPosition(source) 
   local carro = createVehicle ( id, x, y, z  + 10) 
   warpPedIntoVehicle(source, carro) 
 end 
end) 

bandera_de_Venezuela.png

Posted

:roll:

Usa esto:

addEventHandler( 'onPlayerSpawn', root, 
  function(_,_,_,_,theTeam) 
    if getTeamName( theTeam ) == "NOMBRE" then 
      local x, y, z = getElementPosition( source ) 
      warpPedIntoVehicle( source, createVehicle( MODELO, x, y, z + 1.75 ) ) 
    end 
  end 
) 

Developer @ MYVAL

Posted

bueno no me funciono

 thePlayer  
getRootElement 
root   

trate de hacer varias cosas pero no me salio .___.

|El Sabio no tiene intereses propios, hace suyos los intereses del pueblo|

(scripting= -20%)

n-560x95_2B9E08_0AFA4E_000000_030000.png

Posted
bueno no me funciono
 thePlayer  
getRootElement 
root   

trate de hacer varias cosas pero no me salio .___.

¿Error en el debug? ¿Probaste ver si 'team' existe y es un 'team'? ¿Cambiaste 'NOMBRE' y 'MODELO'?

Developer @ MYVAL

Posted

No funciona yo lo Probe, Intenta esto:

addEventHandler( "onPlayerSpawn", root, 
  function(source) 
         local theTeam = getPlayerTeam(source) 
        if theTeam and getTeamName(theTeam) == "NOMBRE" then 
      local x, y, z = getElementPosition( source ) 
      warpPedIntoVehicle( source, createVehicle( ID, x, y, z + 1.75 ) ) 
    end 
  end 
) 

bandera_de_Venezuela.png

Posted (edited)
No funciona yo lo Probe, Intenta esto:
addEventHandler( "onPlayerSpawn", root, 
  function(source) 
         local theTeam = getPlayerTeam(source) 
        if theTeam and getTeamName(theTeam) == "NOMBRE" then 
      local x, y, z = getElementPosition( source ) 
      warpPedIntoVehicle( source, createVehicle( ID, x, y, z + 1.75 ) ) 
    end 
  end 
) 

Por ultima vez: 'source' no va en los argumentos.

De paso probé el mio y si funciona!

addEventHandler( 'onPlayerSpawn', root, 
  function(_,_,_,_,theTeam) 
    outputChatBox( tostring(getTeamName( theTeam ) or 'NONE') ) 
    if getTeamName( theTeam ) == "NOMBRE" then 
      local x, y, z = getElementPosition( source ) 
      warpPedIntoVehicle( source, createVehicle( MODELO or 411, x, y, z + 1.75 ) ) 
    end 
  end 
) 
  

Le puse un 'outputChatBox' para que revises tu 'team'.

Edited by Guest

Developer @ MYVAL

Posted
Y por alguna razón editaste el tuyo ?, HAHA!

¿El mio? el mio sigue igual... solo agregue la etiqueta de 'wiki' a 'getPlayerTeam' por una cosa de costumbre y añadí un par de cosas para que al probar si funciona no falle, revisa y veras que es exactamente igual.

DrHouseFacepalm-tile.jpg

:roll:

Tu error:

Sintiacutetulo-3_zps96e113bd.png

Developer @ MYVAL

Posted

probar este

local VeiculosT = {} 
  
addEventHandler( "onPlayerSpawn", getRootElement(), 
  function() 
   if (getPlayerTeam(source) == getTeamFromName("TuTeamExemplo")) then 
      local x, y, z = getElementPosition( source ) 
      VeiculosT[source] = createVehicle( MODELO, x, y, z + 1.75 ) 
      warpPedIntoVehicle( source,VeiculosT[source]) 
    end 
  end 
) 
  

560x95_FFFFFF_09FF00_050505_000000.png

"Querer não é poder, mas tentar é avançar"!

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...