Jump to content

TAPL

Retired Staff
  • Posts

    7,337
  • Joined

  • Days Won

    11

Everything posted by TAPL

  1. line 7 change hookjob to hitPlayer Edit: and try to organize your code.
  2. https://community.multitheftauto.com/ind ... ls&id=5272 https://community.multitheftauto.com/ind ... ls&id=5273 https://community.multitheftauto.com/ind ... ls&id=5274
  3. try function g_textToRegister(player, user, password, g_textR3) if password ~= g_textR3 then triggerClientEvent(player,"confirmError",player) return end if getAccount(user) then -- the Account already registred before.. return end local account = addAccount(user, password) if logIn(player, account, password) then outputChatBox("successfully registered, welcome "..getPlayerName(player), player, 255, 255, 0 , true) randomModel = math.random(26, 37) setElementModel(player, randomModel) else triggerClientEvent(player,"registerEroor",player) end end addEvent("g_textToRegister", true) addEventHandler("g_textToRegister", root, g_textToRegister)
  4. https://wiki.multitheftauto.com/wiki/Control_names 'brake_reverse'
  5. viewtopic.php?f=91&t=27027
  6. addEventHandler("onPlayerQuit",root, function() local acc = getPlayerAccount(source) if (acc) and not isGuestAccount(acc) then local x,y,z = getElementPosition(source) local money = getPlayerMoney(source) setAccountData(acc,"PosX",x) setAccountData(acc,"PosY",y) setAccountData(acc,"PosZ",z) setAccountData(acc,"Money",money) end end) addEventHandler("onPlayerLogin",root, function(_,acc) local x,y,z = getAccountData(acc,"PosX"),getAccountData(acc,"PosY"),getAccountData(acc,"PosZ") local Money = getAccountData(acc,"Money") or 0 setPlayerMoney(source,Money) spawnPlayer(source,x,y,z) fadeCamera(source, true) setCameraTarget(source) end
  7. try function tirar(_,_,_,_,worldX,worldY,worldZ) if not createProjectile(getLocalPlayer(),19,worldX,worldY,worldZ) then outputChatBox("el misil no se pudo crear") end end
  8. function tirar() local cursorX,cursorY,worldX,worldY,worldZ = getCursorPosition() if not createProjectile(getLocalPlayer(),19,worldX,worldY,worldZ) then outputChatBox("el misil no se pudo crear") end end
  9. i already post Fixed Code, i don't understand why @Jaysds1 post other one. there still others error that i fixed it in my code one of them spawnPlayer(source,posX,posY,posZ,0,Skin,dim,int,AdminTeam) should be spawnPlayer(source,posX,posY,posZ,0,Skin,int,dim,AdminTeam)
  10. just use my code
  11. TAPL

    About ACL

    if you disable the command, the button will disable too.
  12. 1- local Name,Money = getPlayerName(source),getPlayerMoney(source) outputChatBox(Name.." has money $"..Money,root,255,255,255,true) 2- takePlayerMoney(source,5) setPlayerName(source, "NewName") 3- local Name,Kill,Death = getPlayerName(source),getElementData(source,"Kills"),getElementData(source,"Deaths") outputChatBox(Name.." has Kills "..Kill.." and Deaths "..Death,root,255,255,255,true)
  13. Fixed ----SPAWN-System-By-ElMota--- AdminTeam = createTeam("Admin",180,0,0) TodosTeam = createTeam("Todos",0,180,0) addEventHandler("onPlayerLogin",root,function(_,acc) fadeCamera(source,true) setCameraTarget(source) local accName = getAccountName(acc) if isObjectInACLGroup("user."..accName, aclGetGroup("Admin")) then local posX = getAccountData(acc,"PosX") local posY = getAccountData(acc,"PosY") local posZ = getAccountData(acc,"PosZ") local Skin = getAccountData(acc,"Skin") local dim = getAccountData(acc,"Dimension") local int = getAccountData(acc,"Int") if not posX and not posY and not posZ and not Skin and not dim and not int then spawnPlayer(source,247.00835, 1859.81372, 14.08401,0,282,0,0,AdminTeam) elseif posX and posY and posZ and Skin and dim and int then spawnPlayer(source,posX,posY,posZ,0,Skin,int,dim,AdminTeam) end else if not posX and not posY and not posZ and not Skin and not dim and not int then spawnPlayer(source,-342.89999389648,1541.8000488281,74.900001525879,0,16,0,0,TodosTeam) elseif posX and posY and posZ and Skin and dim and int then spawnPlayer(source,posX,posY,posZ,0,Skin,int,dim,TodosTeam) end end end) addEventHandler("onPlayerQuit",root,function() local playeraccount = getPlayerAccount (source) if (playeraccount) and not isGuestAccount(playeraccount) then local posX,PosY,PosZ = getElementPosition(source) setAccountData(playeraccount,"PosX",PosX) setAccountData(playeraccount,"PosY",PosY) setAccountData(playeraccount,"PosZ",PosZ) local skin = getElementModel(source) setAccountData(playeraccount,"Skin",skin) local dim = getElementDimension(source) setAccountData(playeraccount,"Dimension",dim) local int = getElementInterior(source) setAccountData(playeraccount,"Int",int) end end) addEventHandler("onPlayerWasted",root,function(_,killer) local accName = getAccountName(getPlayerAccount(source)) if isObjectInACLGroup("user."..accName, aclGetGroup("Admin")) then spawnPlayer(source,247.00835, 1859.81372, 14.08401,0,282,0,0,AdminTeam) else spawnPlayer(source,-342.89999389648,1541.8000488281,74.900001525879,0,16,0,0,AdminTeam) end end)
  14. TAPL

    طلب كود

    أحذف سطر 42 و أحتمال تحتاج تحذف كمان الي في سطر 41 في الكلينت
  15. i think this is what were saved at the account data. get a good position when you quit, and when you login you will be at it.
  16. TAPL

    getLetters

    string.len() or https://wiki.multitheftauto.com/wiki/UtfLen
  17. ----SPAWN-System-By-ElMota--- AdminTeam = createTeam("Admin",180,0,0) TodosTeam = createTeam("Todos",0,180,0) addEventHandler("onPlayerLogin",root,function(_,acc) fadeCamera(source,true) setCameraTarget(source) local accName = getAccountName(acc) if isObjectInACLGroup("user."..accName, aclGetGroup("Admin")) then local posX = getAccountData(acc,"PosX") local posY = getAccountData(acc,"PosY") local posZ = getAccountData(acc,"PosZ") local Skin = getAccountData(acc,"Skin") local dim = getAccountData(acc,"Dimension") local int = getAccountData(acc,"Int") if not posX and not posY and not posZ and not Skin and not dim and not int then spawnPlayer(source,247.00835, 1859.81372, 14.08401,0,282,0,0,AdminTeam) elseif posX and posY and posZ and Skin and dim and int then spawnPlayer(source,posX,posY,posZ,0,Skin,dim,int,AdminTeam) end else if not posX and not posY and not posZ and not Skin and not dim and not int then spawnPlayer(source,-342.89999389648,1541.8000488281,74.900001525879,0,16,0,0,TodosTeam) elseif posX and posY and posZ and Skin and dim and int then spawnPlayer(source,posX,posY,posZ,0,Skin,dim,int,TodosTeam) end end end) addEventHandler("onPlayerQuit",root,function() local playeraccount = getPlayerAccount (source) if (playeraccount) and not isGuestAccount(playeraccount) then local posX,PosY,PosZ = getElementPosition(source) setAccountData(playeraccount,"PosX",posX) setAccountData(playeraccount,"PosY",posY) setAccountData(playeraccount,"PosZ",posZ) local skin = getElementModel(source) setAccountData(playeraccount,"Skin",skin) local dim = getElementDimension(source) setAccountData(playeraccount,"Dimension",dim) local int = getElementInterior(source) setAccountData(playeraccount,"Int",int) end end) addEventHandler("onPlayerWasted",root,function(_,killer) local accName = getAccountName(getPlayerAccount(source)) if isObjectInACLGroup("user."..accName, aclGetGroup("Admin")) then spawnPlayer(source,247.00835, 1859.81372, 14.08401,0,282,0,0,AdminTeam) else spawnPlayer(source,-342.89999389648,1541.8000488281,74.900001525879,0,16,0,0,AdminTeam) end end)
  18. try ----SPAWN-System-By-ElMota--- createTeam("Admin",180,0,0) createTeam("Todos",0,180,0) addEventHandler("onPlayerLogin",root,function(_,acc) local accName = getAccountName(acc) if isObjectInACLGroup("user."..accName, aclGetGroup("Admin")) then local posX = getAccountData(acc,"PosX") local posY = getAccountData(acc,"PosY") local posZ = getAccountData(ac,"PosZ") local Skin = getAccountData(acc,"Skin") local dim = getAccountData(acc,"Dimension") local int = getAccountData(acc,"Int") local theTeam = getTeamFromName("Admin") if not posX and not posY and not posZ and not Skin and not dim and not int then spawnPlayer(source,247.04785, 1860.30615, 14.08401,0,282,0,0,theTeam) elseif posX and posY and posZ and Skin and dim and int then spawnPlayer(source,posX,posY,posZ,0,Skin,dim,int,theTeam) end else local theTeamE = getTeamFromName("Todos") if not posX and not posY and not posZ and not Skin and not dim and not int then spawnPlayer(source,-342.89999389648,1541.8000488281,74.900001525879,0,16,0,0,theTeamE) elseif posX and posY and posZ and Skin and dim and int then spawnPlayer(source,posX,posY,posZ,0,Skin,dim,int,theTeamE) end end end) addEventHandler("onPlayerQuit",root,function() local playeraccount = getPlayerAccount(source) if (playeraccount) and not isGuestAccount(playeraccount) then local posX,PosY,PosZ = getElementPosition(source) setAccountData(playeraccount,"PosX",posX) setAccountData(playeraccount,"PosY",posY) setAccountData(playeraccount,"PosZ",posZ) local skin = getElementModel(source) setAccountData(playeraccount,"Skin",skin) local dim = getElementDimension(source) setAccountData(playeraccount,"Dimension",dim) local int = getElementInterior(source) setAccountData(playeraccount,"Int",int) end end)
  19. بالويكي موجود مثال https://wiki.multitheftauto.com/wiki/SetCameraMatrix
  20. local Marker = createMarker(x, y, z, "cylinder", Size, r, g, b, Alpha) function hit(hitElement) if hitElement == localPlayer then setElementPosition(hitElement, posX, posY, posZ) end end addEventHandler("onClientMarkerHit",Marker,hit)
  21. viewtopic.php?f=148&t=43732 https://wiki.multitheftauto.com/wiki/GuiGetScreenSize
  22. صورة كبر الشاشة local image = guiCreateStaticImage(0.0,0.0,1.0,1.0,"xxx.png",true) بالنسبة للمربع ذا الصورة فيها مربع فاضي بالفوتوشوب و تحتاج تستخدم ذا عشان تحط الكاميرا على مكان السيارات أو الشخصية https://wiki.multitheftauto.com/wiki/setCameraMatrix
  23. addEvent("car1",true) addEventHandler("car1",root, function() if (getPlayerMoney(source) >= 605000) then takePlayerMoney(source,605000) local x, y, z = getElementPosition(source) vehicle = createVehicle(411, x, y, z) warpPedIntoVehicle(source, vehicle) outputChatBox("#ffffff"..getPlayerName(source).." #ffffff Buy Car ...", root, 255, 0, 0, true) else outputChatBox("You don't have $605000 to buy car", source, 255, 0, 0, true) end end)
  24. i already post the solution, but still your won't work setTimer(function() bindKey(source, "f", "down", herewego ) end,5000, 1) should be setTimer(function(player) bindKey(player, "f", "down", herewego ) end,5000, 1,source)
  25. function setCameraOnPlayerJoin() fadeCamera(source, true, 1) setCameraMatrix(source, -2135.708984375, -187.71142578125, 157.66786193848, 0, 0, 0) setTimer(function(player) bindKey(player, "F", "down", herewego) end,5000,1,source) end addEventHandler("onPlayerJoin", root, setCameraOnPlayerJoin) function herewego(player) local gX, gY, gZ = getElementPosition(player) -- you need this? setCameraTarget(player) setElementPosition(player, 2450.7463378906, -1659.6678466797, 13.3046875) fadeCamera(player, true, 1) setElementFrozen(player, false) unbindKey(player, "F", "down", herewego) end
×
×
  • Create New...