Jump to content

WASSIm.

Members
  • Posts

    1,412
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by WASSIm.

  1. is blip color bleu And you want it which color? normal color how ? i dont know !
  2. hi guys Download: https://community.multitheftauto.com/index.php?p= ... ls&id=3003 i have problem blip color bleu PLIS HELP CLIENT local mapSize=3000 --dimensions of radar map included in res, change it if you change the map local white2=tocolor(255,255,255,200) local lastOffX,lastrid=0,0 local radioStartAt=0 local startsetnewr local newWep local moneydiff local moneydiffchangetime=0 local moneychangestr='' local lastmoney=0 local moneychangetime local wslot=0 local doflash, overrideflash local lastwanchange=getTickCount() local lastwanlvl=0 local weapon=0 local wepswitchtime local airmode local roundAreas={} local radioGoRight local oldRadio=0 local newRadio=0 local normCol=tocolor(255,255,255,255) local black=tocolor(0,0,0,255) local blipTimer local moneydiff local areas={} local blips local lastcurr=0 local hp=180 local armor=0 local areaTimer local hpTimer local dmgTab={} local elemData={} local players={} local blipimages={} local zoomticks=getTickCount() local raceMode local vehicle local parachute local vehSwitchTime=0 local showTime=0 local fps=0 local frames,lastsec=0,0 local showTime=0 local madeByHUD={} local markedvehicles={} local markedpickups={} local doFPS = true local welcomeMsg = true function onStart() getValues() roundAreas=getElementData(root,'roundareadata') or {} setElementData(root,'roundareadata',nil) wslot=getPedWeaponSlot(localP) weapon=getPedWeapon(localP,wslot) moneychangetime=getTickCount() wepswitchtime=getTickCount() blips = getElementsByType('blip') getBlips() for _,v in ipairs(blips) do if not elemData[v] then elemData[v]={} end elemData[v][1]=getElementData(v,'blipText') elemData[v][2]=getElementData(v,'customBlipPath') end areaTimer=setTimer(getRadarAreas,5000,0) hpTimer=setTimer(refreshHP,100,0) bindKey(toogleHUDKey,'down',toogleHUD) bindKey('radio_next','down',radioSwitch,true) bindKey('F4','down',showSettings,true) bindKey('radio_previous','down',radioSwitch,false) bindKey('fire','down',weaponFire) --melee and rpg/greande trigger bindKey(showAllKey,'down',showAll) local dxinfo=dxGetStatus() if dxinfo['VideoMemoryFreeForMTA']<=10 then outputChatBox('Sorry, your video memory is [almost] full.',false,255,0,0) outputChatBox('IVhud can\'t draw weapon icons and radar with no video memory aviable.',false,255,0,0) outputChatBox('Change your MTA settings or visit MTA forums for more help.',false,255,0,0) doDrawRadar,doDrawHUD=false,false elseif not dxinfo then outputChatBox( 'IVhud is not fully compatible with this MTA version.',false,255,0,0) outputChatBox( 'Download MTA 1.1 or higher.',false,255,0,0) doDrawRadar,doDrawHUD=false,false else hudrendertarg=dxCreateRenderTarget(256,300,true) weptarg=dxCreateRenderTarget(256,256,true) texture=dxCreateTexture('images/radar.jpg') mask=dxCreateTexture('images/mask2.png') shader=dxCreateShader('shader.fx') renderImage=dxCreateRenderTarget(size2,size2,false) newtarg=dxCreateRenderTarget(size*3,size*3,false) dxSetShaderValue(shader,'finalAlpha',finalAlpha/255) dxSetShaderValue(shader,'maskTex0',mask) end --posTab=generateRectanglesInRing(size,0.1*size) doGui() doDependableValReCalc() reDelDefaultHUD() addEventHandler('onClientRender',root,renderFrame) if welcomeMsg then outputChatBox('IVhud #909090 loaded! Press F4 for settings.',10,30,140,true) end end function onStop() saveSettings() setElementData(root,'roundareadata',roundAreas) for _,v in ipairs(getElementsByType("blip",resourceRoot)) do destroyElement(v) end killTimer(hpTimer) killTimer(areaTimer) if not raceMode then showPlayerHudComponent('radar',true) showPlayerHudComponent('radio',true) end showPlayerHudComponent('money',true) showPlayerHudComponent('ammo',true) showPlayerHudComponent('weapon',true) showPlayerHudComponent('clock',true) showPlayerHudComponent('armour',true) showPlayerHudComponent('health',true) showPlayerHudComponent('vehicle_name',true) showPlayerHudComponent('area_name',true) showPlayerHudComponent('breath',true) end function onRaceStart() reDelDefaultHUD() setTimer(reDelDefaultHUD,300,1) if not raceMode then raceMode=true if isTimer(hpTimer) then killTimer(hpTimer) end end end function onRaceStop() if raceMode then raceMode=false if not isTimer(hpTimer) then hpTimer=setTimer(refreshHP,100,0) end end end function vehEnter(veh,seat) entering=true worthDrawingRadio=true newRadio=getRadioChannel() oldRadio=newRadio radioSwitchTime=getTickCount() vehSwitchTime=getTickCount() setElementData(source,'vehicleSeat',seat,true) end function vehExit() newRadio=getRadioChannel() oldRadio=getRadioChannel() radioSwitchTime=0 setElementData(source,'vehicleSeat',false,true) end function getRadarRadius () --function from customblips resource if not vehicle then return minDist else if getVehicleType(vehicle) == 'Plane' then return maxDist end local speed = ( getDistanceBetweenPoints3D(0,0,0,getElementVelocity(vehicle)) ) if speed <= minVel then return minDist elseif speed >= maxVel then return maxDist end local streamDistance = speed - minVel streamDistance = streamDistance * ratio streamDistance = streamDistance + minDist return math.ceil(streamDistance) end end function getRot() --function extracted from customblips resource local camRot local cameraTarget = getCameraTarget() if not cameraTarget then local px,py,_,lx,ly = getCameraMatrix() camRot = getVectorRotation(px,py,lx,ly) else if vehicle then if getControlState'vehicle_look_behind' or ( getControlState'vehicle_look_left' and getControlState'vehicle_look_right' ) or ( getVehicleType(vehicle)~='Plane' and getVehicleType(vehicle)~='Helicopter' and ( getControlState'vehicle_look_left' or getControlState'vehicle_look_right' ) ) then camRot = -math.rad(getPedRotation(localP)) else local px,py,_,lx,ly = getCameraMatrix() camRot = getVectorRotation(px,py,lx,ly) end elseif getControlState('look_behind') then camRot = -math.rad(getPedRotation(localP)) else local px,py,_,lx,ly = getCameraMatrix() camRot = getVectorRotation(px,py,lx,ly) end end return camRot end function refreshElementData(name) local etype=getElementType(source) if etype=='blip' and elemData[source] then if name=='blipText' then elemData[source][1]=getElementData(source,name) elseif name=='customBlipPath' then elemData[source][2]=getElementData(source,name) end elseif etype=='player' and name=='vehicleSeat' then if not players[source] then players[source]=getElementData(source,name) end end end function getRadarAreas() areas=getElementsByType('radararea') end function ultilizeDamageScreen(attacker,weapon,_,loss) refreshHP() local type=getElementType(attacker) local slot=type~='vehicle' and getPedWeaponSlot(attacker) or false if attacker and attacker~=source and not (slot==8 or (slot==7 and weapon~=38)) then --if we can find rotation of attacker, and its not using explosive weapon local px1,py1=getElementPosition(source) local px2,py2=getElementPosition(attacker) dmgTab[#dmgTab+1]={getTickCount(),math.deg(getVectorRotation(px1,py1,px2,py2)),math.min(25.5*loss,255)} --1st:attack time 2nd: rotation 3rd: how opaque it should be, reaches max on 10hp hit else --in case its just dmg, not one with direction local len=#dmgTab for n=1,12 do dmgTab[len+n]={getTickCount(),30*n,math.min(25.5*loss,255)} end end if #dmgTab>18 then --we dont want dx overloading repeat table.remove(dmgTab,1) until #dmgTab<18 end end
  3. مرحبا يا شباب و لعبن لا يصطتعون dxdraw أنا أصطتيع رأيت addEventHandler("onClientRender", root, function() dxDrawRectangle(0, 874, 1599, 26, tocolor(0, 0, 0, 160), true) dxDrawLine(0, 873, 1599, 873, tocolor(0, 0, 0, 255), 2, true) dxDrawText(" Page Facebook: [url=https://www.facebook.com/MTASA.TN]https://www.facebook.com/MTASA.TN[/url]", 0, 874, 1599, 899, tocolor(127, 127, 127, 255), 1, "bankgothic", "left", "center", false, false, true, false, false) end ) و أذن كود نقس هذا و أنا لا أعرف كيف نحوت guiGetScreenSize guiGetSize guiSetPosition
  4. localPlayer - كلنت فقط انت وش تبي تسوي بالضبط ؟ أصلح سكربت
  5. local x = math.random(10,100) local y = math.random(10,100) local z = math.random(10,11) local marker1 = createMarker(x, y, z,"checkpoint", 0, 0, 255, 255) local myBlip = createBlipAttachedTo(marker1, 31) function misMoney(hitElement) if getElementType(hitElement) == "player" and player == localPlayer then givePlayerMoney(hitElement, math.random(3000, 5000)) destroyElement(marker1) destroyElement(myBlip) end end addEventHandler("onMarkerHit", marker1, misMoney)
  6. no you add bug i get out in car and my player frozen i delete setElementFrozen ( hitPlayer, true ) and script work 100%
  7. thank you very much you the best and i dont know why add setElementFrozen ( hitPlayer, true )
  8. hi guys 1- i want show GUI for team police and fbi 2- spawn car to team color or nametagcolor Client Wnd = guiCreateWindow ( 0.4, 0.25, 0.25, 0.5, "Police Vehicles", true ) guiSetAlpha( Wnd, 1 ) button = guiCreateButton ( 0.01, 0.8, 0.99, 0.15, "Close", true, Wnd ) label = guiCreateLabel ( 0.1, 0.1, 0.9, 0.1, "Double Click Vehicle to take it.", true, Wnd ) showCursor(false) guiSetVisible( Wnd, false ) guiWindowSetSizable( Wnd, false ) guiWindowSetMovable( Wnd, false ) vehicles = { {"HPV1000", 523}, {"Police LS", 596}, {"Police LV", 598}, {"Police Ranger", 599}, } grid = guiCreateGridList(0.01, 0.2, 0.99, 0.5, true, Wnd) guiGridListAddColumn(grid, "Vehicles", 0.85) for i,veh in ipairs(vehicles) do row = guiGridListAddRow(grid) -- guiGridListSetItemText(grid, row, 1, tostring(veh[1]), false, false) guiGridListSetItemData(grid, row, 1, tostring(veh[2])) end function use() local row, col = guiGridListGetSelectedItem(grid) if (row and col and row ~= -1 and col ~= -1) then local model = tonumber(guiGridListGetItemData(grid, row, 1)) if model ~= "" then triggerServerEvent("CreVehiceP", localPlayer, model) end end end addEventHandler("onClientDoubleClick", root, use, false) function close() if (source == button) then guiSetVisible(Wnd,false) showCursor(false) end end addEventHandler("onClientGUIClick", button, close) function showGUI2p() guiSetVisible(Wnd,true) showCursor(true) end addEvent("showGUI2p",true) addEventHandler("showGUI2p", getRootElement(), showGUI2p) Server markerp = createMarker( 1556.9852294922, -1608.2557373047, 12.3828125, "cylinder", 2, 0, 0, 255, 255 ) marker2p = createMarker( 1570.1909179688, -1608.2557373047, 12.3828125, "cylinder", 2, 0, 0, 255, 255 ) marker3p = createMarker( 1584.61328125, -1608.2557373047, 12.3828125, "cylinder", 2, 0, 0, 255, 255 ) marker4p = createMarker( 1595.1407470703, -1608.2557373047, 12.3828125, "cylinder", 2, 0, 0, 255, 255 ) local vehicles = {} function spawnVehP(id) theTeam = getPlayerTeam( source ) theTeamName = getTeamName( theTeam ) if ( theTeamName == "police" ) or ( theTeamName == "FBI" ) then local x, y, z = getElementPosition(source) if isElement(vehicles[source]) then destroyElement(vehicles[source]) end vehicles[source] = createVehicle(id, x, y, z + 1) warpPedIntoVehicle(source, vehicles[source]) else outoutChatBox("Only police agents and FBI can get free vehicles from here!", source, 255, 0, 0) end end addEvent("CreVehiceP",true) addEventHandler("CreVehiceP", root, spawnVehP) addEventHandler("onPlayerQuit", root, function() if isElement(vehicles[source]) then destroyElement(vehicles[source]) vehicles[source] = nil end end) function showGUIp(hitPlayer) setElementFrozen(source, true) triggerClientEvent (hitPlayer,"showGUI2p",getRootElement(),hitPlayer) end addEventHandler("onMarkerHit",markerp,showGUIp) function showGUIp(hitPlayer) setElementFrozen(source, true) triggerClientEvent (hitPlayer,"showGUI2p",getRootElement(),hitPlayer) end addEventHandler("onMarkerHit",marker2p,showGUIp) function showGUIp(hitPlayer) setElementFrozen(source, true) triggerClientEvent (hitPlayer,"showGUI2p",getRootElement(),hitPlayer) end addEventHandler("onMarkerHit",marker3p,showGUIp) function showGUIp(hitPlayer) setElementFrozen(source, true) triggerClientEvent (hitPlayer,"showGUI2p",getRootElement(),hitPlayer) end addEventHandler("onMarkerHit",marker4p,showGUIp)
  9. WASSIm.

    DD Pointsystem

    Go in this https://community.multitheftauto.com/index.php
  10. viewtopic.php?f=91&t=52267&p=509080#p509080
  11. WASSIm.

    [HELP]Save

    no just press in [ X ]
  12. WASSIm.

    [HELP]Save

    hi guys i have problem: i reconnect in my server random save position and weapon and i close and open server save occupation and team and nametagcolor and other save delete plis help function playerLogin (thePreviousAccount, theCurrentAccount, autoLogin) if not (isGuestAccount (getPlayerAccount (source))) then local accountData = getAccountData (theCurrentAccount, "funmodev2-money") if (accountData) then local playerMoney = getAccountData (theCurrentAccount, "funmodev2-money") local playerSkin = getAccountData (theCurrentAccount, "funmodev2-skin") local playerHealth = getAccountData (theCurrentAccount, "funmodev2-health") local playerArmor = getAccountData (theCurrentAccount, "funmodev2-armor") local R = getAccountData (theCurrentAccount, "funmodev2-R") local G = getAccountData (theCurrentAccount, "funmodev2-G") local B = getAccountData (theCurrentAccount, "funmodev2-B") local playerX = getAccountData (theCurrentAccount, "funmodev2-x") local playerY = getAccountData (theCurrentAccount, "funmodev2-y") local playerZ = getAccountData (theCurrentAccount, "funmodev2-z") local playerInt = getAccountData (theCurrentAccount, "funmodev2-int") local playerDim = getAccountData (theCurrentAccount, "funmodev2-dim") local playerWanted = getAccountData (theCurrentAccount, "funmodev2-wantedlevel") local playerTeam = getAccountData (theCurrentAccount, "funmodev2-Team") local playerWeaponID0 = getAccountData (theCurrentAccount, "funmodev2-weaponID0") local playerWeaponID1 = getAccountData (theCurrentAccount, "funmodev2-weaponID1") local playerWeaponID2 = getAccountData (theCurrentAccount, "funmodev2-weaponID2") local playerWeaponID3 = getAccountData (theCurrentAccount, "funmodev2-weaponID3") local playerWeaponID4 = getAccountData (theCurrentAccount, "funmodev2-weaponID4") local playerWeaponID5 = getAccountData (theCurrentAccount, "funmodev2-weaponID5") local playerWeaponID6 = getAccountData (theCurrentAccount, "funmodev2-weaponID6") local playerWeaponID7 = getAccountData (theCurrentAccount, "funmodev2-weaponID7") local playerWeaponID8 = getAccountData (theCurrentAccount, "funmodev2-weaponID8") local playerWeaponID9 = getAccountData (theCurrentAccount, "funmodev2-weaponID9") local playerWeaponID10 = getAccountData (theCurrentAccount, "funmodev2-weaponID10") local playerWeaponID11 = getAccountData (theCurrentAccount, "funmodev2-weaponID11") local playerWeaponID12 = getAccountData (theCurrentAccount, "funmodev2-weaponID12") local playerWeaponAmmo0 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo0") local playerWeaponAmmo1 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo1") local playerWeaponAmmo2 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo2") local playerWeaponAmmo3 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo3") local playerWeaponAmmo4 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo4") local playerWeaponAmmo5 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo5") local playerWeaponAmmo6 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo6") local playerWeaponAmmo7 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo7") local playerWeaponAmmo8 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo8") local playerWeaponAmmo9 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo9") local playerWeaponAmmo10 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo10") local playerWeaponAmmo11 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo11") local playerWeaponAmmo12 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo12") local occupation = getAccountData (theCurrentAccount, "funmodev2-occupation") spawnPlayer (source, playerX, playerY, playerZ +1, 0, playerSkin, playerInt, playerDim) setPlayerMoney (source, playerMoney) setElementData(source, "Occupation") setTimer (setElementHealth, 50, 1, source, playerHealth) setTimer (setPedArmor, 50, 1, source, playerArmor) setTimer (setPlayerWantedLevel, 50, 1, source, playerWanted) giveWeapon(source, playerWeaponID0, playerWeaponAmmo0, true) giveWeapon(source, playerWeaponID1, playerWeaponAmmo1, false) giveWeapon(source, playerWeaponID2, playerWeaponAmmo2, false) giveWeapon(source, playerWeaponID3, playerWeaponAmmo3, false) giveWeapon(source, playerWeaponID4, playerWeaponAmmo4, false) giveWeapon(source, playerWeaponID5, playerWeaponAmmo5, false) giveWeapon(source, playerWeaponID6, playerWeaponAmmo6, false) giveWeapon(source, playerWeaponID7, playerWeaponAmmo7, false) giveWeapon(source, playerWeaponID8, playerWeaponAmmo8, false) giveWeapon(source, playerWeaponID9, playerWeaponAmmo9, false) giveWeapon(source, playerWeaponID10, playerWeaponAmmo10, false) giveWeapon(source, playerWeaponID11, playerWeaponAmmo11, false) giveWeapon(source, playerWeaponID12, playerWeaponAmmo12, false) setCameraTarget (source, source) fadeCamera(source, true, 2.0) setPlayerNametagColor (source, R, G, B) setElementData ( source, "Occupation", occupation ) else spawnPlayer (source, 1481.0855712891, -1771.2996826172, 18.795753479004, 0,78, 0, 0) setPlayerMoney (source, 200) setCameraTarget (source, source) fadeCamera(source, true, 2.0) setPlayerNametagColor (source, 255, 255, 255) end end end addEventHandler ("onPlayerLogin", getRootElement(), playerLogin) function onLogout () kickPlayer (source, nil, "Logging out is disallowed.") end addEventHandler ("onPlayerLogout", getRootElement(), onLogout) function onQuit (quitType, reason, responsibleElement) if not (isGuestAccount (getPlayerAccount (source))) then account = getPlayerAccount (source) if (account) then local x,y,z = getElementPosition (source) local r,g,b = getPlayerNametagColor (source) setAccountData (account, "funmodev2-money", tostring (getPlayerMoney (source))) setAccountData (account, "funmodev2-skin", tostring (getPedSkin (source))) setAccountData (account, "funmodev2-health", tostring (getElementHealth (source))) setAccountData (account, "funmodev2-armor", tostring (getPedArmor (source))) setAccountData (account, "funmodev2-R", r) setAccountData (account, "funmodev2-G", g) setAccountData (account, "funmodev2-B", b) setAccountData (account, "funmodev2-x", x) setAccountData (account, "funmodev2-y", y) setAccountData (account, "funmodev2-z", z) setAccountData (account, "funmodev2-int", getElementInterior (source)) setAccountData (account, "funmodev2-dim", getElementDimension (source)) setAccountData (account, "funmodev2-wantedlevel", getPlayerWantedLevel (source)) setAccountData (account, "funmodev2-weaponID0", getPedWeapon (source, 0)) setAccountData (account, "funmodev2-weaponID1", getPedWeapon (source, 1)) setAccountData (account, "funmodev2-weaponID2", getPedWeapon (source, 2)) setAccountData (account, "funmodev2-weaponID3", getPedWeapon (source, 3)) setAccountData (account, "funmodev2-weaponID4", getPedWeapon (source, 4)) setAccountData (account, "funmodev2-weaponID5", getPedWeapon (source, 5)) setAccountData (account, "funmodev2-weaponID6", getPedWeapon (source, 6)) setAccountData (account, "funmodev2-weaponID7", getPedWeapon (source, 7)) setAccountData (account, "funmodev2-weaponID8", getPedWeapon (source, -- s8) -->) setAccountData (account, "funmodev2-weaponID9", getPedWeapon (source, 9)) setAccountData (account, "funmodev2-weaponID10", getPedWeapon (source, 10)) setAccountData (account, "funmodev2-weaponID11", getPedWeapon (source, 11)) setAccountData (account, "funmodev2-weaponID12", getPedWeapon (source, 12)) setAccountData (account, "funmodev2-weaponAmmo0", getPedTotalAmmo (source, 0)) setAccountData (account, "funmodev2-weaponAmmo1", getPedTotalAmmo (source, 1)) setAccountData (account, "funmodev2-weaponAmmo2", getPedTotalAmmo (source, 2)) setAccountData (account, "funmodev2-weaponAmmo3", getPedTotalAmmo (source, 3)) setAccountData (account, "funmodev2-weaponAmmo4", getPedTotalAmmo (source, 4)) setAccountData (account, "funmodev2-weaponAmmo5", getPedTotalAmmo (source, 5)) setAccountData (account, "funmodev2-weaponAmmo6", getPedTotalAmmo (source, 6)) setAccountData (account, "funmodev2-weaponAmmo7", getPedTotalAmmo (source, 7)) setAccountData (account, "funmodev2-weaponAmmo8", getPedTotalAmmo (source, -- s8) -->) setAccountData (account, "funmodev2-weaponAmmo9", getPedTotalAmmo (source, 9)) setAccountData (account, "funmodev2-weaponAmmo10", getPedTotalAmmo (source, 10)) setAccountData (account, "funmodev2-weaponAmmo11", getPedTotalAmmo (source, 11)) setAccountData (account, "funmodev2-weaponAmmo12", getPedTotalAmmo (source, 12)) setAccountData (account, "funmodev2-occupation", getElementData ( source, "Occupation" )) end end end addEventHandler ("onPlayerQuit", getRootElement(), onQuit) function onWasted(totalAmmo, killer, killerWeapon, bodypart, stealth) if not( isGuestAccount (getPlayerAccount(source)) ) then local theWeapon = getPedWeapon (source) local weaponAmmo = getPedTotalAmmo (source) fadeCamera (source, false) setTimer (spawnPlayer, 1000, 1, source, 2036.1735839844, -1413.0563964844, 16.9921875, 0, getPedSkin (source), 0, 0, getPlayerTeam(source)) setTimer (setCameraTarget, 1250, 1, source, source) setTimer (fadeCamera, 2000, 1, source, true) setTimer (giveWeapon, 2000, 1, source, theWeapon, weaponAmmo, true) end end addEventHandler ("onPlayerWasted", getRootElement(), onWasted) --- function setTeam() local account = getPlayerAccount(source) -- gets players account local team = getAccountData (account, "team") -- gets players team if (team) and getTeamFromName(team) then setPlayerTeam(source, getTeamFromName(team)) -- sets players team end end addEventHandler("onPlayerLogin",root,setTeam) -- sets players team on login function save() local team = getPlayerTeam(source) -- Gets the players team local account = getPlayerAccount(source) if (team) and not isGuestAccount(account) then -- Checks to see if the player is a guest or not setAccountData(account, "team", getTeamName(team)) --saves team end end addEventHandler("onPlayerQuit", getRootElement(), save) -- saves team on quit
  13. Just posting errors liek this is really stupid -__- can't you just delete it? i reconnect in server: random save position and weapon i close and open server: save occupation and team and nametagcolor and other save delete
  14. Script not work ERROR: savesystem\server.lua:110: unexpected symbol near '<'
  15. thanks very much how i can add in save system ??? function playerLogin (thePreviousAccount, theCurrentAccount, autoLogin) if not (isGuestAccount (getPlayerAccount (source))) then local accountData = getAccountData (theCurrentAccount, "funmodev2-money") if (accountData) then local playerMoney = getAccountData (theCurrentAccount, "funmodev2-money") local playerSkin = getAccountData (theCurrentAccount, "funmodev2-skin") local playerHealth = getAccountData (theCurrentAccount, "funmodev2-health") local playerArmor = getAccountData (theCurrentAccount, "funmodev2-armor") local R = getAccountData (theCurrentAccount, "funmodev2-R") local G = getAccountData (theCurrentAccount, "funmodev2-G") local B = getAccountData (theCurrentAccount, "funmodev2-B") local playerX = getAccountData (theCurrentAccount, "funmodev2-x") local playerY = getAccountData (theCurrentAccount, "funmodev2-y") local playerZ = getAccountData (theCurrentAccount, "funmodev2-z") local playerInt = getAccountData (theCurrentAccount, "funmodev2-int") local playerDim = getAccountData (theCurrentAccount, "funmodev2-dim") local playerWanted = getAccountData (theCurrentAccount, "funmodev2-wantedlevel") local playerTeam = getAccountData (theCurrentAccount, "funmodev2-Team") local playerWeaponID0 = getAccountData (theCurrentAccount, "funmodev2-weaponID0") local playerWeaponID1 = getAccountData (theCurrentAccount, "funmodev2-weaponID1") local playerWeaponID2 = getAccountData (theCurrentAccount, "funmodev2-weaponID2") local playerWeaponID3 = getAccountData (theCurrentAccount, "funmodev2-weaponID3") local playerWeaponID4 = getAccountData (theCurrentAccount, "funmodev2-weaponID4") local playerWeaponID5 = getAccountData (theCurrentAccount, "funmodev2-weaponID5") local playerWeaponID6 = getAccountData (theCurrentAccount, "funmodev2-weaponID6") local playerWeaponID7 = getAccountData (theCurrentAccount, "funmodev2-weaponID7") local playerWeaponID8 = getAccountData (theCurrentAccount, "funmodev2-weaponID8") local playerWeaponID9 = getAccountData (theCurrentAccount, "funmodev2-weaponID9") local playerWeaponID10 = getAccountData (theCurrentAccount, "funmodev2-weaponID10") local playerWeaponID11 = getAccountData (theCurrentAccount, "funmodev2-weaponID11") local playerWeaponID12 = getAccountData (theCurrentAccount, "funmodev2-weaponID12") local playerWeaponAmmo0 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo0") local playerWeaponAmmo1 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo1") local playerWeaponAmmo2 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo2") local playerWeaponAmmo3 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo3") local playerWeaponAmmo4 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo4") local playerWeaponAmmo5 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo5") local playerWeaponAmmo6 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo6") local playerWeaponAmmo7 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo7") local playerWeaponAmmo8 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo8") local playerWeaponAmmo9 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo9") local playerWeaponAmmo10 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo10") local playerWeaponAmmo11 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo11") local playerWeaponAmmo12 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo12") spawnPlayer (source, playerX, playerY, playerZ +1, 0, playerSkin, playerInt, playerDim) setPlayerMoney (source, playerMoney) setElementData(source, "Occupation") setTimer (setElementHealth, 50, 1, source, playerHealth) setTimer (setPedArmor, 50, 1, source, playerArmor) setTimer (setPlayerWantedLevel, 50, 1, source, playerWanted) giveWeapon(source, playerWeaponID0, playerWeaponAmmo0, true) giveWeapon(source, playerWeaponID1, playerWeaponAmmo1, false) giveWeapon(source, playerWeaponID2, playerWeaponAmmo2, false) giveWeapon(source, playerWeaponID3, playerWeaponAmmo3, false) giveWeapon(source, playerWeaponID4, playerWeaponAmmo4, false) giveWeapon(source, playerWeaponID5, playerWeaponAmmo5, false) giveWeapon(source, playerWeaponID6, playerWeaponAmmo6, false) giveWeapon(source, playerWeaponID7, playerWeaponAmmo7, false) giveWeapon(source, playerWeaponID8, playerWeaponAmmo8, false) giveWeapon(source, playerWeaponID9, playerWeaponAmmo9, false) giveWeapon(source, playerWeaponID10, playerWeaponAmmo10, false) giveWeapon(source, playerWeaponID11, playerWeaponAmmo11, false) giveWeapon(source, playerWeaponID12, playerWeaponAmmo12, false) setCameraTarget (source, source) fadeCamera(source, true, 2.0) setPlayerNametagColor (source, R, G, B) else spawnPlayer (source, 1481.0855712891, -1771.2996826172, 18.795753479004, 0,78, 0, 0) setPlayerMoney (source, 200) setCameraTarget (source, source) fadeCamera(source, true, 2.0) setPlayerNametagColor (source, 255, 255, 255) end end end addEventHandler ("onPlayerLogin", getRootElement(), playerLogin) function onLogout () kickPlayer (source, nil, "Logging out is disallowed.") end addEventHandler ("onPlayerLogout", getRootElement(), onLogout) function onQuit (quitType, reason, responsibleElement) if not (isGuestAccount (getPlayerAccount (source))) then account = getPlayerAccount (source) if (account) then local x,y,z = getElementPosition (source) local r,g,b = getPlayerNametagColor (source) setAccountData (account, "funmodev2-money", tostring (getPlayerMoney (source))) setAccountData (account, "funmodev2-skin", tostring (getPedSkin (source))) setAccountData (account, "funmodev2-health", tostring (getElementHealth (source))) setAccountData (account, "funmodev2-armor", tostring (getPedArmor (source))) setAccountData (account, "funmodev2-R", r) setAccountData (account, "funmodev2-G", g) setAccountData (account, "funmodev2-B", b) setAccountData (account, "funmodev2-x", x) setAccountData (account, "funmodev2-y", y) setAccountData (account, "funmodev2-z", z) setAccountData (account, "funmodev2-int", getElementInterior (source)) setAccountData (account, "funmodev2-dim", getElementDimension (source)) setAccountData (account, "funmodev2-wantedlevel", getPlayerWantedLevel (source)) setAccountData (account, "funmodev2-weaponID0", getPedWeapon (source, 0)) setAccountData (account, "funmodev2-weaponID1", getPedWeapon (source, 1)) setAccountData (account, "funmodev2-weaponID2", getPedWeapon (source, 2)) setAccountData (account, "funmodev2-weaponID3", getPedWeapon (source, 3)) setAccountData (account, "funmodev2-weaponID4", getPedWeapon (source, 4)) setAccountData (account, "funmodev2-weaponID5", getPedWeapon (source, 5)) setAccountData (account, "funmodev2-weaponID6", getPedWeapon (source, 6)) setAccountData (account, "funmodev2-weaponID7", getPedWeapon (source, 7)) setAccountData (account, "funmodev2-weaponID8", getPedWeapon (source, -- s8) -->) setAccountData (account, "funmodev2-weaponID9", getPedWeapon (source, 9)) setAccountData (account, "funmodev2-weaponID10", getPedWeapon (source, 10)) setAccountData (account, "funmodev2-weaponID11", getPedWeapon (source, 11)) setAccountData (account, "funmodev2-weaponID12", getPedWeapon (source, 12)) setAccountData (account, "funmodev2-weaponAmmo0", getPedTotalAmmo (source, 0)) setAccountData (account, "funmodev2-weaponAmmo1", getPedTotalAmmo (source, 1)) setAccountData (account, "funmodev2-weaponAmmo2", getPedTotalAmmo (source, 2)) setAccountData (account, "funmodev2-weaponAmmo3", getPedTotalAmmo (source, 3)) setAccountData (account, "funmodev2-weaponAmmo4", getPedTotalAmmo (source, 4)) setAccountData (account, "funmodev2-weaponAmmo5", getPedTotalAmmo (source, 5)) setAccountData (account, "funmodev2-weaponAmmo6", getPedTotalAmmo (source, 6)) setAccountData (account, "funmodev2-weaponAmmo7", getPedTotalAmmo (source, 7)) setAccountData (account, "funmodev2-weaponAmmo8", getPedTotalAmmo (source, -- s8) -->) setAccountData (account, "funmodev2-weaponAmmo9", getPedTotalAmmo (source, 9)) setAccountData (account, "funmodev2-weaponAmmo10", getPedTotalAmmo (source, 10)) setAccountData (account, "funmodev2-weaponAmmo11", getPedTotalAmmo (source, 11)) setAccountData (account, "funmodev2-weaponAmmo12", getPedTotalAmmo (source, 12)) end end end addEventHandler ("onPlayerQuit", getRootElement(), onQuit) function onWasted(totalAmmo, killer, killerWeapon, bodypart, stealth) if not( isGuestAccount (getPlayerAccount(source)) ) then local theWeapon = getPedWeapon (source) local weaponAmmo = getPedTotalAmmo (source) fadeCamera (source, false) setTimer (spawnPlayer, 1000, 1, source, 2036.1735839844, -1413.0563964844, 16.9921875, 0, getPedSkin (source), 0, 0, getPlayerTeam(source)) setTimer (setCameraTarget, 1250, 1, source, source) setTimer (fadeCamera, 2000, 1, source, true) setTimer (giveWeapon, 2000, 1, source, theWeapon, weaponAmmo, true) end end addEventHandler ("onPlayerWasted", getRootElement(), onWasted) --- function setTeam() local account = getPlayerAccount(source) -- gets players account local team = getAccountData (account, "team") -- gets players team if (team) and getTeamFromName(team) then setPlayerTeam(source, getTeamFromName(team)) -- sets players team end end addEventHandler("onPlayerLogin",root,setTeam) -- sets players team on login function save() local team = getPlayerTeam(source) -- Gets the players team local account = getPlayerAccount(source) if (team) and not isGuestAccount(account) then -- Checks to see if the player is a guest or not setAccountData(account, "team", getTeamName(team)) --saves team end end addEventHandler("onPlayerQuit", getRootElement(), save) -- saves team on quit
  16. hi guys i have problem server call ( getResourceFromName ( "scoreboard" ), "scoreboardAddColumn", "Occupation" ) this my problem how fix ???
  17. yes just add save nametagcolor
  18. this is good script https://community.multitheftauto.com/index.php?p= ... ls&id=1960
×
×
  • Create New...