Jump to content

pick up


depato123

Recommended Posts

Hola tengo un problema con un pick up

policePickUp = createPickUp (1275, 252.00704956055, 111.79605102539, 1003.21875) 
  
function policePickUp () 
    if ( getPlayerTeam ( source ) and getTeamName ( getPlayerTeam ( source ) ) == "Policia" ) then 
        giveplayerweapon 
        setPedSkin ( source, 280 ) 
        giveWeapon ( source, 22, 255, true ) 
        giveWeapon ( source, 3, 1, false ) 
        setPedArmor ( source, 50 ) 
    else 
        outputChatBox ( "solo los policias pueden recojer el armamento", source) 
    end 
end 
addEventHandler ( "onPickupUse", policePickUp, policeskinpickup ) 

[2013-11-10 12:48:29] SCRIPT ERROR: resource\1.lua:6: '=' expected near 'setPedSkin'

[2013-11-10 12:48:29] ERROR: Loading script failed: resource\1.lua:6: '=' expected near 'setPedSkin'

Ese es el error que me sale.

El resource tendria que verificar si el usuario que pasa por el pick up es del team "Policias", si el usuario lo es tendria que darle 2 armas, armadura y un skin, y si el usuario no lo es tendria que aparecerle "solo los policias pueden recojer el armamento". Pero me sale ese error. Ayuda

Link to comment
Quita esto: "giveplayerweapon".

fail xD.

Me tira otro error ahora

policepickup = createPickup (252.00704956055, 111.79605102539, 1003.21875, 3, 1275, 15000 ) 
  
function pickuphit () 
    if ( getPlayerTeam ( source ) and getTeamName ( getPlayerTeam ( source ) ) == "Policia" ) then 
        setPedSkin ( source, 280 ) 
        giveWeapon ( source, 22, 255, true ) 
        giveWeapon ( source, 3, 1, false ) 
        setPedArmor ( source, 50 ) 
    else 
        outputChatBox ( "solo los policias pueden recojer el armamento", source) 
    end 
end 
addEventHandler ( "onPickupUse", pickuphit, policepickup ) 

[2013-11-10 13:22:05] WARNING: resource\1.lua:13: Bad argument @ 'addEventHandler' [Expected element at argument 2, got function]

Link to comment

No se que pasa con los errores...

Ahora me sale esto

[2013-11-10 13:35:15] WARNING: frecam\1.lua:5: Bad 'player' pointer @ 'getPlayerTeam'(1)

policepickup = createPickup (252.00704956055, 111.79605102539, 1003.21875, 3, 1275, 15000 ) 
setElementInterior ( policepickup, 10 ) 
  
function pickuphit () 
    if ( getPlayerTeam ( source ) and getTeamName ( getPlayerTeam ( source ) ) == "Policia" ) then 
        setPedSkin ( source, 280 ) 
        giveWeapon ( source, 22, 255, true ) 
        giveWeapon ( source, 3, 1, false ) 
        setPedArmor ( source, 50 ) 
    else 
        outputChatBox ( "solo los policias pueden recojer el armamento", source) 
    end 
end 
addEventHandler ( "onPickupUse", policepickup, pickuphit ) 

Link to comment
  • Recently Browsing   0 members

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