Tomas Posted June 16, 2014 Posted June 16, 2014 Hola, quería saber si existe alguna forma de que un pickup lo pueda usar solo un team, desde ya muchas gracias Currently developing for International Gaming Community - Join us!
Arsilex Posted June 16, 2014 Posted June 16, 2014 local pickup = createPickup ( 0, 0, 5, 1,100) function isPlayerInTeam( thePlayer, teamName ) local pTeam = getPlayerTeam( thePlayer ) local fTeam = getTeamFromName( teamName ) if ( pTeam ) and ( fTeam ) then if ( pTeam == fTeam ) then return true end end end function pickupUse ( thePlayer ) if source == pickup then if isPlayerInTeam (thePlayer, "TeamName") then setPedArmor(thePlayer, 100) else cancelEvent() end end end addEventHandler ( "onPickupUse", getRootElement(), pickupUse )
Tomas Posted June 17, 2014 Author Posted June 17, 2014 Graciassssssss genio!! :DD Currently developing for International Gaming Community - Join us!
Recommended Posts