Jump to content

iPrestege

Members
  • Posts

    10,056
  • Joined

  • Last visited

  • Days Won

    27

Everything posted by iPrestege

  1. --determine whether color change can be made with a command cmd = true --the command to use thecmd = "neon" function neon(plr,cmd,r,g,b,a) if not r then openGui(plr) return true end if tonumber(tostring(r)) == nil then r,g,b,a = getColorFromString(r) end if not a then a = 200 end veh = getPedOccupiedVehicle(plr) if veh and r and g and b then model = getElementModel(veh) if canHaveNeon(veh) then if haveNeon(veh) then setNeonColor(veh,tonumber(r),tonumber(g),tonumber(b)) end end end end if cmd then addCommandHandler(thecmd,neon) end function setNeonColor(vehicle,r,g,b) setElementData(vehicle,"neonlight",tostring(r)..","..tostring(g)..","..tostring(b)..","..tostring(a)) for i,mark in ipairs(getElementsByType("marker")) do local type = getMarkerType(mark) if type == "corona" then local data1 = getElementData(vehicle,"neonMarker1") local data2 = getElementData(vehicle,"neonMarker2") if data1 == mark or data2 == mark then setMarkerColor(mark,r,g,b,80) end end end return true end function haveNeon(vehicle) local data = getElementData(vehicle,"haveneon") if data then return true else return false end end function addNeon(vehicle,state) if getElementType(vehicle) == "vehicle" then if state then setElementData(vehicle,"haveneon",true) x,y,z = getElementPosition(vehicle) -- local exist = nil for i,mark in ipairs(getElementsByType("marker")) do data = getElementData(vehicle,"neonMarker1") if data == mark then local exist = mark end end if not exist then local marker1 = createMarker(x,y,z,"corona",2,0,0,0,0) attachElements(marker1,vehicle,0,-1,-1.2) setElementData(vehicle,"neonMarker1",marker1) local marker2 = createMarker(x,y,z,"corona",2,0,0,0,0) attachElements(marker2,vehicle,0,1,-1.2) setElementData(vehicle,"neonMarker2",marker2) end -- return true else setElementData(vehicle,"haveneon",false) setElementData(veh,"neonlight","off!!!") -- for i,mark in ipairs(getElementsByType("marker")) do local type = getMarkerType(mark) if type == "corona" then local data1 = getElementData(vehicle,"neonMarker1") local data2 = getElementData(vehicle,"neonMarker2") if data1 == mark or data2 == mark then setMarkerColor(mark,0,0,0,0) end end end -- return true end else return false end end function canHaveNeon(veh) model = getElementModel(veh) if veh and getElementType(veh) == "vehicle" then x = mayHaveNeon(model) return x else return false end end function mayHaveNeon(model) if model ~= 592 and model ~= 511 and model ~= 584 and model ~= 512 and model ~= 593 and model ~= 417 and model ~= 487 and model ~= 553 and model ~= 488 and model ~= 563 and model ~= 476 and model ~= 519 and model ~= 460 and model ~= 469 and model ~= 513 and model ~= 472 and model ~= 473 and model ~= 493 and model ~= 595 and model ~= 484 and model ~= 430 and model ~= 453 and model ~= 452 and model ~= 446 and model ~= 454 and model ~= 403 and model ~= 514 and model ~= 443 and model ~= 515 and model ~= 455 and model ~= 406 and model ~= 486 and model ~= 578 and model ~= 532 and model ~= 524 and model ~= 498 and model ~= 609 and model ~= 568 and model ~= 457 and model ~= 508 and model ~= 571 and model ~= 539 and model ~= 606 and model ~= 607 and model ~= 485 and model and model ~= 581 and model ~= 509 and model ~= 481 and model ~= 462 and model ~= 521 and model ~= 463 and model ~= 510 and model ~= 522 and model ~= 461 and model ~= 448 and model ~= 468 and model ~= 586 and model ~= 485 and model ~= 552 and model ~= 431 and model ~= 438 and model ~= 437 and model ~= 574 and model ~= 525 and model ~= 408 and model ~= 416 and model ~= 433 and model ~= 427 and model ~= 490 and model ~= 528 and model ~= 407 and model ~= 544 and model ~= 523 and model ~= 470 and model ~= 596 and model ~= 597 and model ~= 598 and model ~= 599 and model ~= 432 and model ~= 601 and model ~= 428 and model ~= 499 and model ~= 449 and model ~= 537 and model ~= 538 and model ~= 570 and model ~= 569 and model ~= 590 and model ~= 441 and model ~= 464 and model ~= 501 and model ~= 465 and model ~= 564 and model ~= 594 then return true else return false end end function deactivateNeon(vehicle) if getElementType(vehicle) == "vehicle" then setElementData(vehicle,"neonlight","off!!!") for i,mark in ipairs(getElementsByType("marker")) do local type = getMarkerType(mark) if type == "corona" then local data1 = getElementData(vehicle,"neonMarker1") local data2 = getElementData(vehicle,"neonMarker2") if data1 == mark or data2 == mark then setMarkerColor(mark,0,0,0,0) end end end return true else return false end end function openGui(plr) local veh = getPedOccupiedVehicle(plr) if haveNeon(veh) then triggerClientEvent(plr,"openNeonGui",root) end end addEventHandler("onPlayerJoin",root,function() for i,veh in ipairs(getElementsByType("vehicle")) do data = getElementData(veh,"neonlight") setElementData(veh,"neonlight",data) end end) for i,veh in ipairs(getElementsByType("vehicle")) do deactivateNeon(veh) end addEvent("closeNeonGui",true) addEventHandler("closeNeonGui",root,function(r,g,b) local veh = getPedOccupiedVehicle(source) setNeonColor(veh,r,g,b) end)
  2. iPrestege

    Stuff team

    BaWstaff = createTeam ( "BaWstaff", 100, 100, 100 ) function enterTEAM (player ) local accName1 = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accName1, aclGetGroup ( "Admin" ) ) or hasObjectPermissionTo( player, 'function.kickPlayer', false ) then setPlayerTeam ( player, BaWstaff) setElementModel( player, 217 ) setPlayerNametagColor ( player, 100, 100, 100 ) end end addCommandHandler("joinstaff",enterTEAM)
  3. iPrestege

    Help

    theplayer and you put theP.
  4. iPrestege

    Help

    Like this? -- Server -- addCommandHandler("spin", function (thePlayer) money = getPlayerMoney(thePlayer) outputChatBox(" "..money.." ") end)
  5. وتلومني أقولك مآخذ بآك آب؟
  6. The State "crouch" not working good .
  7. Show the account data .
  8. مركب سكربت من سكربتاتنا الحصرية وتقول دليل؟
  9. جآيني يقولي سحبت ملفات رومك وتقولي دليل ؟ دليل وش Lool?
  10. كويس ماشاء الله العرب مافيهم ثقة ابدا ذذ
  11. مآخرب ولا شيء #بس نظام الاطفال ياليت تخلية وتكون قد الثقة وارفع علومكك #
  12. iPrestege

    Help

    No problem but i mean the meta.xml just need the main file's .
  13. iPrestege

    Help

    u wan't just get you're money or all player's on the server by player name?
  14. iPrestege

    Help

    The info line is not needed every topic u say where's the info line lol?
  15. iPrestege

    global chat

    Try it and tell me .
  16. # لا مجرد أنك تسرب بآك آب للروم هذي ماهي مشكلة؟ اي اف بي اس اجل البحري وش بـ تصير و السمعة في الارض
  17. iPrestege

    global chat

    Try this server side : function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ); local name = getPlayerName(thePlayer); for _,v in ipairs(getElementsByType("player")) do outputChatBox("#FF0000[GLOBAL]#00FF00"..name..": #FFFFFF"..message,v, 255, 255, 255, true) end end addCommandHandler("global", globalMessage); addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"b", "down", "chatbox", "global"); end end ) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "b", "down", "chatbox", "global"); end )
  18. iPrestege

    global chat

    Lol sorry. I didnt see that . Thanks for correcting me. EDIT: so... function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ) local name = getPlayerName(thePlayer) outputChatBox("#FF0000[GLOBAL]#00FF00"..name..": #FFFFFF"..message, getRootElement(), 255, 255, 255, true) end addCommandHandler("global", globalMessage) bindKey(getRootElement(), "b", "down", "chatbox", "global") Is it correctly? No that's wrong won't work
  19. So it won't kill the ped!
  20. iPrestege

    global chat

    bindKey(source, "b", "down", "chatbox", "global") This is an example for server side.
×
×
  • Create New...