Jump to content

DiGiTal

Members
  • Posts

    277
  • Joined

  • Last visited

Everything posted by DiGiTal

  1. DiGiTal

    ID System

    ids={} function joiner(plr) for i=1,getMaxPlayers() do if not ids[i] then ids[i] = source setElementData(source,"id",i) break end end end addEventHandler("onPlayerJoin",root,joiner) function id() for k, v in ipairs(getElementsByType("player")) do local MyID = getElementData(v,"id") if true then setPlayerName(v,"[..MyID..]..getPlayerName(v)) end end end end
  2. function verify() local players = getElementsByType ( "player" ) for k,v in ipairs(players) do local accountname = "" if (isGuestAccount(getPlayerAccount(v)) == false) then accountname = getAccountName (getPlayerAccount(v)) if isObjectInACLGroup("user." .. accountname, aclGetGroup ( "Admin" )) then return true else return false end end end end function teleport(plr,cmd,r) if getPlayerFromName(r) then local receiver=getPlayerName(r) local x,y,z=getElementPosition(r) local adminName=getPlayerName(plr) if (verify()==true) then spawnPlayer(plr,x,y,z) outputChatBox('You Have Been Teleported To '..receiver,plr) outputChatBox('Admin '.. adminName..'Have Been Teleported To You ',r) else outputChatBox('YOU ARE NOT ALLOWED TO USE THIS COMMAND',plr) end end addCommandHandler('teleport',teleport)
  3. Did there is solution, to create window ;just for getting the xyz width height without joining in game mtasa Thanks
  4. function createLoginGui () wdwLogin = guiCreateWindow(529, 206, 488, "Login Panel", false) guiWindowSetMovable (wdwLogin, false) guiWindowSetSizable (wdwLogin, false) guiSetAlpha (wdwLogin, 1.00) guiSetProperty (wdwLogin, "CaptionColour", "FFFEFEFE") lblMainLogin = guiCreateLabel (7, 14, 293, 48, "Testing server", true, wdwLogin) guiSetFont (lblMainLogin, "clear-normal") guiLabelSetColor(lblMainLogin, "center", true) guiLabelSetHorizontalAlign (lblMainLogin, "center", true) guiLabelSetVerticalAlign (lblMainLogin, "center", true) guiLabelSetVerticalAlign (lblMainLogin, "center") lblUsernameLogin = guiCreateLabel (11, 77, 124, 24, "Username", true, wdwLogin) edtUsernameLogin = guiCreateEdit (11, 106, 279, 34, "", true, wdwLogin) lblPasswordLogin = guiCreateLabel (16, 147, 128, 24, "Password", true, wdwLogin) edtPasswordLogin = guiCreateEdit (11, 171, 279, 34, "", true, wdwLogin) btnLogin = guiCreateButton (10, 308, 114, 34, "Register", true, wdwLogin) guiSetVisible (wdwLogin, true) end function start() createLoginGui() if wdwLogin then outputChatBox("Welcome to the testing server") showCursor (true) guiSetInputEnabled (true) else outputChatBox("Failed to create login panel") showCursor (false) end end addEventHandler ("onClientResourceStart", getRootElement(),start) You should revise wiki functions: outputChatBox not outputChatbox !!!!!! guiCreateEdit not guicreateEdit !!!!!! you should use the syntax https://forum.multitheftauto.com/topic/38240-tut-notepad-auto-complete-amp-syntax-highlighting/
  5. break is for loop else u musn't add then, "then" is for if
  6. ---- local GroupName = 'KILLERS' ---- function turnedON() active=true outputChatBox("Spawn enabled") end addCommandHandler("active", turnedON) function turnedOFF() active=false outputChatBox("Spawn disabled") end addCommandHandler("desactive", turnedOFF) function onWasted () if active == true then if getElementData(source,'Group') == 'KILLERS' then setTimer( function (source) setElementDimension( source, 0 ) setElementPosition( source, 2478.705078125+math.random(1,1), -1685.421875+math.random(1,1), 13.5078125 ) setElementInterior( source, 0 ) setPedArmor ( source, 100) setPedFightingStyle ( source, 5) end, 1000, 1, source) end end end addEventHandler ( "onPlayerSpawn", getRootElement(), onWasted ) @side there were some errors
  7. yea, for example: create small icon , when player click on it dispear the precedent content and show the new one !
  8. DiGiTal

    help me

    of course i forgot to add a handler function onPlayerCommand(thePlayer, command, vehicleModel) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if not isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" ) ) then if (tonumber(vehicleModel) == 520) then return outputChatBox ( "● You must be VIP to spawn this vehicle", thePlayer, 255, 0, 0 ) end local x,y,z = getElementPosition(thePlayer) x = x + 5 local createdVehicle = createVehicle(tonumber(vehicleModel),x,y,z) outputChatBox("●"..getVehicleName(createdVehicle).."Has been spawned",thePlayer, 255, 0, 0 ) end addCommandHandler("cv", onPlayerCommand) add Command , it's an handler by a command, means when player do command (ex:/greet) it handle a function ( here it's onPlayerCommand)
  9. DiGiTal

    help me

    function onPlayerCommand(thePlayer, command, vehicleModel) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if not isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" ) ) then if (tonumber(vehicleModel) == 520) then return outputChatBox ( "● You must be VIP to spawn this vehicle", thePlayer, 255, 0, 0 ) end local x,y,z = getElementPosition(thePlayer) x = x + 5 local createdVehicle = createVehicle(tonumber(vehicleModel),x,y,z) outputChatBox("●"..getVehicleName(createdVehicle).."Has been spawned",thePlayer, 255, 0, 0 ) end addCommandHandler("cv", onPlayerCommand) @Scarfas
  10. join our discord we will desicuss there
  11. no probleme. if you are new in scripting and wanna learn more Check TPF
  12. https://wiki.multitheftauto.com/wiki/Resource:Votemanager
  13. How ' cops still alive ' the robers change the map and cops stay in precedent map . explaine please mORE!
  14. Hello,let me introduce my self.My name is Damazigh, I'm 17 years old. My hobbies is to play foot ball and scripting. I'm a designer(logos,banners,posters,web design) experienced 4years. I'm WEB DEVELOPER that means i can create STATIC (without using the server side) and DYNAMIC(using the server for data base ...etc). I'm MTA:SA SCRIPTER which i have a good level . Contact me By: -Discord: DiGiTal#2028 -PM ME
  15. For me this company is the Best.you should try their services
  16. chase mode is following ?? and what about following mode ?
  17. DiGiTal

    Help me

    I think he mean skin mod how to install it
  18. Me too i dont get the diffetence between chasing and hunting
  19. DiGiTal

    Help

    I think you have to draw only a rectangle and it you will put a label For ex. Getnumnotify It will return the count of notify
  20. Why its limited to use the outputdebugstring ? Or i didnt understood
  21. Use the create vehicule on server side and call it
  22. DiGiTal

    Editor help

    delete and download again mtasa . i think you done /unbindall or just go to settings and go to binds tab then reset defaults @Salem
  23. كيفاش نساعدك. عين الكلينت ولا السرفر وين عندك.الشك
×
×
  • Create New...