Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.05 KB | None | 0 0
  1. function showBeacon ( thePlayer, commandName )
  2.         if exports.players:isLoggedIn( thePlayer ) then
  3.                 local pdMember = getElementsByType("player")
  4.                 local inPD, factionID, factionName, factionTag = exports.factions:isPlayerInFactionType( pdMember, 1 )
  5.                 if inPD and factionTag then
  6.                         outputChatBox("You are in PD", pdMember)
  7.                     else
  8.                         outputChatBox("Error", pdMember, 255, 0, 0)
  9.                     --[[    if not backupBeacon then
  10.                                 local playerx, playery, playerz = getElementPosition( thePlayer )
  11.                                 backupBlip = createBlip( playerx, playery, playerz, 0, 3, 255, 0, 0, 255, 0 , 99999.0, pdMember)
  12.                                 outputChatBox("A unit is in need of assistance, respond ASAP!", pdMember, 255, 150, 0)
  13.                                 attachElements ( backupBlip, thePlayer)
  14.                                 backupBeacon = true
  15.                             else
  16.                                 destroyElement( backupBlip )
  17.                                 backupBeacon = false
  18.                                 outputChatBox("The unit no longer requires assistance.", pdMember, 255, 150, 0)
  19.  
  20.                         end]]
  21.                 end
  22.         end
  23. end
  24. addCommandHandler("backup", showBeacon)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement