elchinooo98 Posted April 2, 2016 Share Posted April 2, 2016 Buenas, queria saber como podria hacer para agregar a mi codigo para que los que no esten logeados, no puedan entrar en la colRectangle... El Codigo : local lazona = createColRectangle(-2618.1044921875, 580.1943359375, 85, 125) function enter( hitElement, matchingDimension) local gangName = getElementData ( hitElement, "gang" ) if ( gangName and gangName ~= "White Thunder" ) then setElementPosition(hitElement, -2559.7236328125, 564.45703125, 14.4609375 ) outputChatBox("#ff0000No Sos del Clan White Thunder Para Entrar en su Base",hitElement,255,255,255,true) veh = getPedOccupiedVehicle(hitElement) if (veh) then setElementPosition(veh, -2559.7236328125, 564.45703125, 14.4609375 ) outputChatBox("#ff0000No Sos del White Thunder Para Entrar en su Base",hitElement,255,255,255,true) end end end addEventHandler("onColShapeHit", lazona, enter) Desde Ya Muchas Gracias Link to comment
elchinooo98 Posted April 2, 2016 Author Share Posted April 2, 2016 isGuestAccount si ya se que tengo que usar eso, pero no se como añadirlo al codigo ya que nunca lo use. Link to comment
Guest Posted April 2, 2016 Share Posted April 2, 2016 local lazona = createColRectangle(-2618.1044921875, 580.1943359375, 85, 125) function enter( hitElement, matchingDimension) if isGuestAccount (getPlayerAccount(hitElement)) then setElementPosition(hitElement, -2559.7236328125, 564.45703125, 14.4609375 ) outputChatBox("Loguea antes de poder entrar a la base",hitElement,255,255,0) return end local gangName = getElementData ( hitElement, "gang" ) if ( gangName and gangName ~= "White Thunder" ) then setElementPosition(hitElement, -2559.7236328125, 564.45703125, 14.4609375 ) outputChatBox("#ff0000No Sos del Clan White Thunder Para Entrar en su Base",hitElement,255,255,255,true) veh = getPedOccupiedVehicle(hitElement) if (veh) then setElementPosition(veh, -2559.7236328125, 564.45703125, 14.4609375 ) outputChatBox("#ff0000No Sos del White Thunder Para Entrar en su Base",hitElement,255,255,255,true) end end end addEventHandler("onColShapeHit", lazona, enter) Link to comment
elchinooo98 Posted April 2, 2016 Author Share Posted April 2, 2016 local lazona = createColRectangle(-2618.1044921875, 580.1943359375, 85, 125) function enter( hitElement, matchingDimension) if isGuestAccount (getPlayerAccount(hitElement)) then setElementPosition(hitElement, -2559.7236328125, 564.45703125, 14.4609375 ) outputChatBox("Loguea antes de poder entrar a la base",hitElement,255,255,0) return end local gangName = getElementData ( hitElement, "gang" ) if ( gangName and gangName ~= "White Thunder" ) then setElementPosition(hitElement, -2559.7236328125, 564.45703125, 14.4609375 ) outputChatBox("#ff0000No Sos del Clan White Thunder Para Entrar en su Base",hitElement,255,255,255,true) veh = getPedOccupiedVehicle(hitElement) if (veh) then setElementPosition(veh, -2559.7236328125, 564.45703125, 14.4609375 ) outputChatBox("#ff0000No Sos del White Thunder Para Entrar en su Base",hitElement,255,255,255,true) end end end addEventHandler("onColShapeHit", lazona, enter) Gracias polluelo me sirvio Link to comment
Tomas Posted April 3, 2016 Share Posted April 3, 2016 local lazona = createColRectangle(-2618.1044921875, 580.1943359375, 85, 125) function enter( hitElement, matchingDimension) if isGuestAccount (getPlayerAccount(hitElement)) then setElementPosition(hitElement, -2559.7236328125, 564.45703125, 14.4609375 ) outputChatBox("Loguea antes de poder entrar a la base",hitElement,255,255,0) return end local gangName = getElementData ( hitElement, "gang" ) if ( gangName and gangName ~= "White Thunder" ) then setElementPosition(hitElement, -2559.7236328125, 564.45703125, 14.4609375 ) outputChatBox("#ff0000No Sos del Clan White Thunder Para Entrar en su Base",hitElement,255,255,255,true) veh = getPedOccupiedVehicle(hitElement) if (veh) then setElementPosition(veh, -2559.7236328125, 564.45703125, 14.4609375 ) outputChatBox("#ff0000No Sos del White Thunder Para Entrar en su Base",hitElement,255,255,255,true) end end end addEventHandler("onColShapeHit", lazona, enter) Gracias polluelo me sirvio Ten en cuenta que si entra alguien en un auto se bugeará tó. Link to comment
Enargy, Posted April 3, 2016 Share Posted April 3, 2016 local lazona = createColRectangle(-2618.1044921875, 580.1943359375, 85, 125) function enter( hitElement, matchingDimension) if isGuestAccount (getPlayerAccount(hitElement)) then setElementPosition(hitElement, -2559.7236328125, 564.45703125, 14.4609375 ) outputChatBox("Loguea antes de poder entrar a la base",hitElement,255,255,0) return end local gangName = getElementData ( hitElement, "gang" ) if ( gangName and gangName ~= "White Thunder" ) then setElementPosition(hitElement, -2559.7236328125, 564.45703125, 14.4609375 ) outputChatBox("#ff0000No Sos del Clan White Thunder Para Entrar en su Base",hitElement,255,255,255,true) veh = getPedOccupiedVehicle(hitElement) if (veh) then setElementPosition(veh, -2559.7236328125, 564.45703125, 14.4609375 ) outputChatBox("#ff0000No Sos del White Thunder Para Entrar en su Base",hitElement,255,255,255,true) end end end addEventHandler("onColShapeHit", lazona, enter) Gracias polluelo me sirvio Ten en cuenta que si entra alguien en un auto se bugeará tó. Aqui. if isGuestAccount (getPlayerAccount(hitElement)) then local c = getPedOccupiedVehicle(hitElement) if c then removePedFromVehicle(hitElement, c) end setElementPosition(hitElement, -2559.7236328125, 564.45703125, 14.4609375 ) outputChatBox("Loguea antes de poder entrar a la base",hitElement,255,255,0) return end Link to comment
Tomas Posted April 3, 2016 Share Posted April 3, 2016 Aqui. if isGuestAccount (getPlayerAccount(hitElement)) then local c = getPedOccupiedVehicle(hitElement) if c then removePedFromVehicle(hitElement, c) end setElementPosition(hitElement, -2559.7236328125, 564.45703125, 14.4609375 ) outputChatBox("Loguea antes de poder entrar a la base",hitElement,255,255,0) return end Y ahí habrían debugs. Link to comment
Recommended Posts