Jump to content

Monty

Members
  • Posts

    167
  • Joined

  • Last visited

Everything posted by Monty

  1. Monty

    script editor

    i mean this script editor viewtopic.php?f=91&t=24834
  2. lo script editor non alva le modifiche... help!!! l'ho messo in D:\MTA San Andreas\server\mods\deathmatch\resource\editorscript
  3. Monty

    script editor

    same problem, doesn't save
  4. Monty

    script editor

    in a folder or just put there the files?
  5. Monty

    jail error

    createBlip ( 1552.4996337891, -1677.3264160156, 15.1953125, 30 ) function createSAPDTeam () SAPDteam = createTeam ("police", 100, 149, 237) end addEventHandler ("onResourceStart", resourceRoot, createSAPDTeam) function joinSAPD() setPlayerTeam(source,SAPDteam) setElementModel(source, 280) giveWeapon ( source, 3 ) setAccountData( playeraccount, "Occupation", "police") outputChatBox("You are now policeman.",source,0,255,0) end addEvent("setSAPD", true) addEventHandler("setSAPD",root,joinSAPD) function policeJob ( attacker, attackerweapon, bodypart, loss ) theTeam = getPlayerTeam ( attacker ) theWL = getPlayerWantedLevel ( source ) theSkin = getElementModel ( attacker ) if (attackerweapon == 3) and (loss > 2 ) and (theWL > 0) then if ( getTeamName( theTeam ) == "police" ) or ( ( getTeamName( theTeam ) == "SWAT" ) ) or ( ( getTeamName( theTeam ) == "FBI" ) )then setElementPosition (source, 4076.3999023438, -1788.5, 3.511967, true) theName = getPlayerName ( source ) theCop = getPlayerName ( attacker ) outputChatBox ( "You have been jailed by "..theCop.. " for 10 seconds.", source ) local playeraccount = getPlayerAccount ( attacker ) arrests = getAccountData(playeraccount, "arrest") setAccountData(playeraccount, "arrest", arrests + 1 ) givePlayerMoney (attacker, 100) setTimer ( setElementPosition, 10000, 1, source, 1544.4332275391, -1674.7698974609, 13.688399200439) setPlayerWantedLevel (source, 0) end end end addEventHandler ("onPlayerDamage", getRootElement(), policeJob)
  6. Monty

    script editor

    D:\MTA San Andreas 1.3\server\mods\deathmatch\resources\underneath deathmatch correct?
  7. Monty

    jail error

    what you mean with teabulate?
  8. Monty

    script editor

    why the script editor doesn't save changes??? i put it into [...]\MTA san andreas\server\mods\deathmatch is it correct?
  9. Monty

    jail error

    says bad argument getPlayerTeam
  10. Monty

    jail error

    why i don't get unjailed after 10 sec? function policeJob ( attacker, attackerweapon, bodypart, loss ) theTeam = getPlayerTeam ( attacker ) theWL = getPlayerWantedLevel ( source ) theSkin = getElementModel ( attacker ) if (attackerweapon == 3) and (loss > 2 ) and (theWL > 0) then if ( getTeamName( theTeam ) == "police" ) or ( ( getTeamName( theTeam ) == "SWAT" ) ) or ( ( getTeamName( theTeam ) == "FBI" ) )then setElementPosition (source, 4076.3999023438, -1788.5, 3.511967, true) theName = getPlayerName ( source ) theCop = getPlayerName ( attacker ) outputChatBox ( "You have been jailed by "..theCop.. " for 10 seconds.", source ) local playeraccount = getPlayerAccount ( attacker ) arrests = getAccountData(playeraccount, "arrest") setAccountData(playeraccount, "arrest", arrests + 1 ) givePlayerMoney (attacker, 100) setTimer ( setElementPosition, 10000, 1, source, 1544.4332275391, -1674.7698974609, 13.688399200439) setPlayerWantedLevel (source, 0) end end end addEventHandler ("onPlayerDamage", getRootElement(), policeJob)
  11. function onPlayerQuit ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local x,y,z = getElementPosition (source) setAccountData ( playeraccount, "s.HandMoney", getPlayerMoney ( source ) ) setAccountData (playeraccount, "s.skin", tostring (getPedSkin (source))) setAccountData (playeraccount, "s.x", x) setAccountData (playeraccount, "s.y", y) setAccountData (playeraccount, "s.z", z) setAccountData (playeraccount, "s.int", getElementInterior (source)) setAccountData (playeraccount, "s.dim", getElementDimension (source)) setAccountData (playeraccount, "s.rot", getPedRotation (source)) setAccountData (playeraccount, "s.weap0", getPedWeapon ( source, 0 )) setAccountData (playeraccount, "s.weap1", getPedWeapon ( source, 1 )) setAccountData (playeraccount, "s.weap2", getPedWeapon ( source, 2 )) setAccountData (playeraccount, "s.ammo2", getPedTotalAmmo ( source, 2 )) setAccountData (playeraccount, "s.weap3", getPedWeapon ( source, 3 )) setAccountData (playeraccount, "s.ammo3", getPedTotalAmmo ( source, 3 )) setAccountData (playeraccount, "s.weap4", getPedWeapon ( source, 4 )) setAccountData (playeraccount, "s.ammo4", getPedTotalAmmo ( source, 4 )) setAccountData (playeraccount, "s.weap5", getPedWeapon ( source, 5 )) setAccountData (playeraccount, "s.ammo5", getPedTotalAmmo ( source, 5 )) setAccountData (playeraccount, "s.weap6", getPedWeapon ( source, 6 )) setAccountData (playeraccount, "s.ammo6", getPedTotalAmmo ( source, 6 )) setAccountData (playeraccount, "s.weap7", getPedWeapon ( source, 7 )) setAccountData (playeraccount, "s.ammo7", getPedTotalAmmo ( source, 7 )) setAccountData (playeraccount, "s.weap8", getPedWeapon ( source, 8 )) setAccountData (playeraccount, "s.ammo8", getPedTotalAmmo ( source, 8 )) setAccountData (playeraccount, "s.weap9", getPedWeapon ( source, 9 )) setAccountData (playeraccount, "s.ammo9", getPedTotalAmmo ( source, 9 )) setAccountData (playeraccount, "s.weap10", getPedWeapon ( source, 10 )) setAccountData (playeraccount, "s.weap11", getPedWeapon ( source, 11 )) setAccountData (playeraccount, "s.weap12", getPedWeapon ( source, 12 )) local teamsav = getPlayerTeam(source) setAccountData (playeraccount, "team", getTeamName( teamsav )) end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) local root = getRootElement() addEventHandler("onPlayerLogin", root, function() local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local playermoney = getAccountData ( playeraccount, "s.HandMoney" ) if ( playermoney ) then setPlayerMoney ( source, playermoney ) end local playerInt = getAccountData (playeraccount, "s.int") local playerDim = getAccountData (playeraccount, "s.dim") local playerSkin = getAccountData (playeraccount, "s.skin") local playerX = getAccountData (playeraccount, "s.x") local playerY = getAccountData (playeraccount, "s.y") local playerZ = getAccountData (playeraccount, "s.z") local playerRot = getAccountData (playeraccount, "s.rot") spawnPlayer(source, playerX, playerY, playerZ, playerRot, playerSkin, playerInt, playerDim) fadeCamera (source, true) setCameraTarget (source, source) local weap0 = getAccountData(playeraccount, "s.weap0") local weap1 = getAccountData(playeraccount, "s.weap1") local weap2 = getAccountData(playeraccount, "s.weap2") local ammo2 = getAccountData(playeraccount, "s.ammo2") local weap3 = getAccountData(playeraccount, "s.weap3") local ammo3 = getAccountData(playeraccount, "s.ammo3") local weap4 = getAccountData(playeraccount, "s.weap4") local ammo4 = getAccountData(playeraccount, "s.ammo4") local weap5 = getAccountData(playeraccount, "s.weap5") local ammo5 = getAccountData(playeraccount, "s.ammo5") local weap6 = getAccountData(playeraccount, "s.weap6") local ammo6 = getAccountData(playeraccount, "s.ammo6") local weap7 = getAccountData(playeraccount, "s.weap7") local ammo7 = getAccountData(playeraccount, "s.ammo7") local weap8 = getAccountData(playeraccount, "s.weap8") local ammo8 = getAccountData(playeraccount, "s.ammo8") local weap9 = getAccountData(playeraccount, "s.weap9") local ammo9 = getAccountData(playeraccount, "s.ammo9") local weap10 = getAccountData(playeraccount, "s.weap10") local weap11 = getAccountData(playeraccount, "s.weap11") local weap12 = getAccountData(playeraccount, "s.weap12") local team = getAccountData(playeraccount, "team") local team2 = getTeamFromName(team) setPlayerTeam (source, team2) giveWeapon ( source, weap0, 1 ) giveWeapon ( source, weap1, 1 ) giveWeapon ( source, weap2, ammo2 ) giveWeapon ( source, weap3, ammo3 ) giveWeapon ( source, weap4, ammo4 ) giveWeapon ( source, weap5, ammo5 ) giveWeapon ( source, weap6, ammo6 ) giveWeapon ( source, weap7, ammo7 ) giveWeapon ( source, weap8, ammo8 ) giveWeapon ( source, weap9, ammo9 ) giveWeapon ( source, weap10, 1 ) giveWeapon ( source, weap11, 1 ) giveWeapon ( source, weap12, 1 ) end end )
  12. i press f2 but no gui appear GUIEditor_Window = {} GUIEditor_Label = {} GUIEditor_Window[1] = guiCreateWindow(277,224,250,120,"POLICE Computer",false) GUIEditor_Label[1] = guiCreateLabel(8,11,83,20,"Name:"..getPlayerName(thePlayer),false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(8,22,83,20,"Arrest:",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(8,41,52,20,"Team:"..getTeamName(getPlayerTeam(thePlayer)),false,GUIEditor_Window[1]) GUIEditor_Label[3] = guiCreateLabel(92,22,53,18,"ARMY:"..countPlayerInTeam(getTeamFromName("ARMY")),false,GUIEditor_Window[1]) GUIEditor_Label[4] = guiCreateLabel(92,41,52,18,"SWAT:"..countPlayerInTeam(getTeamFromName("SWAT")),false,GUIEditor_Window[1]) GUIEditor_Label[5] = guiCreateLabel(165,22,39,15,"FBI:"..countPlayerInTeam(getTeamFromName("FBI")),false,GUIEditor_Window[1]) GUIEditor_Label[6] = guiCreateLabel(165,41,40,14,"Police:..countPlayerInTeam(getTeamFromName("police"))",false,GUIEditor_Window[1]) guiSetVisible( GUIEditor_Window[1], false ) showCursor ( false ) function showGUI ( ) guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) end bindKey ( "F2","down", showGUI )
  13. local teamsav = getPlayerTeam(source) setAccountData (playeraccount, "team", getTeamName( teamsav ) so i load them local team = getAccountData(playeraccount, "team") local team2 = getTeamFromName(team) setPlayerTeam (source, team2) correct?
  14. getTeamFromName is the same of getTeamName(getPlayerTeam(source)) right?
  15. usa /debugscript 3 e che errore ti da... secondo me non va messo nell'acl
  16. is it correct? local teamsav = getPlayerTeam(source) setAccountData (playeraccount, "team", getTeamName ( teamsav ))
  17. why doesn't this script save my team? function onPlayerQuit ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local x,y,z = getElementPosition (source) setAccountData ( playeraccount, "s.HandMoney", getPlayerMoney ( source ) ) setAccountData (playeraccount, "s.skin", tostring (getPedSkin (source))) setAccountData (playeraccount, "s.x", x) setAccountData (playeraccount, "s.y", y) setAccountData (playeraccount, "s.z", z) setAccountData (playeraccount, "s.int", getElementInterior (source)) setAccountData (playeraccount, "s.dim", getElementDimension (source)) setAccountData (playeraccount, "s.rot", getPedRotation (source)) setAccountData (playeraccount, "s.weap0", getPedWeapon ( source, 0 )) setAccountData (playeraccount, "s.weap1", getPedWeapon ( source, 1 )) setAccountData (playeraccount, "s.weap2", getPedWeapon ( source, 2 )) setAccountData (playeraccount, "s.ammo2", getPedTotalAmmo ( source, 2 )) setAccountData (playeraccount, "s.weap3", getPedWeapon ( source, 3 )) setAccountData (playeraccount, "s.ammo3", getPedTotalAmmo ( source, 3 )) setAccountData (playeraccount, "s.weap4", getPedWeapon ( source, 4 )) setAccountData (playeraccount, "s.ammo4", getPedTotalAmmo ( source, 4 )) setAccountData (playeraccount, "s.weap5", getPedWeapon ( source, 5 )) setAccountData (playeraccount, "s.ammo5", getPedTotalAmmo ( source, 5 )) setAccountData (playeraccount, "s.weap6", getPedWeapon ( source, 6 )) setAccountData (playeraccount, "s.ammo6", getPedTotalAmmo ( source, 6 )) setAccountData (playeraccount, "s.weap7", getPedWeapon ( source, 7 )) setAccountData (playeraccount, "s.ammo7", getPedTotalAmmo ( source, 7 )) setAccountData (playeraccount, "s.weap8", getPedWeapon ( source, 8 )) setAccountData (playeraccount, "s.ammo8", getPedTotalAmmo ( source, 8 )) setAccountData (playeraccount, "s.weap9", getPedWeapon ( source, 9 )) setAccountData (playeraccount, "s.ammo9", getPedTotalAmmo ( source, 9 )) setAccountData (playeraccount, "s.weap10", getPedWeapon ( source, 10 )) setAccountData (playeraccount, "s.weap11", getPedWeapon ( source, 11 )) setAccountData (playeraccount, "s.weap12", getPedWeapon ( source, 12 )) setAccountData (playeraccount, "team", getPlayerTeam ( source )) end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) local root = getRootElement() addEventHandler("onPlayerLogin", root, function() local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local playermoney = getAccountData ( playeraccount, "s.HandMoney" ) if ( playermoney ) then setPlayerMoney ( source, playermoney ) end local playerInt = getAccountData (playeraccount, "s.int") local playerDim = getAccountData (playeraccount, "s.dim") local playerSkin = getAccountData (playeraccount, "s.skin") local playerX = getAccountData (playeraccount, "s.x") local playerY = getAccountData (playeraccount, "s.y") local playerZ = getAccountData (playeraccount, "s.z") local playerRot = getAccountData (playeraccount, "s.rot") spawnPlayer(source, playerX, playerY, playerZ, playerRot, playerSkin, playerInt, playerDim) fadeCamera (source, true) setCameraTarget (source, source) local weap0 = getAccountData(playeraccount, "s.weap0") local weap1 = getAccountData(playeraccount, "s.weap1") local weap2 = getAccountData(playeraccount, "s.weap2") local ammo2 = getAccountData(playeraccount, "s.ammo2") local weap3 = getAccountData(playeraccount, "s.weap3") local ammo3 = getAccountData(playeraccount, "s.ammo3") local weap4 = getAccountData(playeraccount, "s.weap4") local ammo4 = getAccountData(playeraccount, "s.ammo4") local weap5 = getAccountData(playeraccount, "s.weap5") local ammo5 = getAccountData(playeraccount, "s.ammo5") local weap6 = getAccountData(playeraccount, "s.weap6") local ammo6 = getAccountData(playeraccount, "s.ammo6") local weap7 = getAccountData(playeraccount, "s.weap7") local ammo7 = getAccountData(playeraccount, "s.ammo7") local weap8 = getAccountData(playeraccount, "s.weap8") local ammo8 = getAccountData(playeraccount, "s.ammo8") local weap9 = getAccountData(playeraccount, "s.weap9") local ammo9 = getAccountData(playeraccount, "s.ammo9") local weap10 = getAccountData(playeraccount, "s.weap10") local weap11 = getAccountData(playeraccount, "s.weap11") local weap12 = getAccountData(playeraccount, "s.weap12") local team = getAccountData(playeraccount, "team") setPlayerTeam (source, team) giveWeapon ( source, weap0, 1 ) giveWeapon ( source, weap1, 1 ) giveWeapon ( source, weap2, ammo2 ) giveWeapon ( source, weap3, ammo3 ) giveWeapon ( source, weap4, ammo4 ) giveWeapon ( source, weap5, ammo5 ) giveWeapon ( source, weap6, ammo6 ) giveWeapon ( source, weap7, ammo7 ) giveWeapon ( source, weap8, ammo8 ) giveWeapon ( source, weap9, ammo9 ) giveWeapon ( source, weap10, 1 ) giveWeapon ( source, weap11, 1 ) giveWeapon ( source, weap12, 1 ) end end )
  18. Monty

    legalsystem

    in this resource https://community.multitheftauto.com/ind ... ils&id=292 what's the name of the team of cops? is it called "copteam"?
  19. tried also with source, not working
  20. [2012-06-20 19:50:03] WARNING: ROADadmin\base_area69.lua:6: Bad argument @ 'getAccountName' [Expected account at argument 1, got boolean] [2012-06-20 19:50:08] WARNING: ROADadmin\base_area69.lua:15: Bad argument @ 'getAccountName' [Expected account at argument 1, got boolean]
  21. i tried with the player, it works, but the console always says bad argument
  22. why the console says bad argument? basegate = createObject ( 3115, 1728.8000488281, -1378.0999755859, 13.5, 0, 90, 0 ) basecol = createColCircle ( 1728.8000488281, -1378.0999755859, 13.5, 7 ) function openbase_area69gates ( thePlayer ) local gang = exports [ 'ROADgang' ]:getAccountGang ( getAccountName ( getPlayerAccount ( client ) ) ) --changed source to client (for safety reasons) if ( gang == "SWAT" ) then moveObject ( basegate, 5000, 1728.8000488281, -1378.0999755859, 0 ) end end addEventHandler ( "onColShapeHit", basecol, openbase_area69gates ) function closebase_area69gates(thePlayer) local gang = exports [ 'ROADgang' ]:getAccountGang ( getAccountName ( getPlayerAccount ( client ) ) ) --changed source to client (for safety reasons) if ( gang == "SWAT" ) then moveObject (basegate, 5000, 1728.8000488281, -1378.0999755859, 13.5 ) end end addEventHandler( "onColShapeLeave", basecol, closebase_area69gates )
  23. what's wrong? GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} function guiMyCwindow(w,h,t) local x,y = guiGetScreenSize() return guiCreateWindow((x-w)/2,(y-h)/2,w,h,t,false) end GUIEditor_Window[1] = guiMyCwindow(359,185,"Play Sound From URL") guiSetVisible(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) URLE = guiCreateEdit(16,72,328,38,"",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(21,44,75,18,"Sound URL :",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(11,116,330,20,"* File Extensions : mp3 , wav, ogg, riff , mod, xm, it , s3m",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[2],255,0,0) PlayStop = guiCreateButton(204,140,127,36,"Play",false,GUIEditor_Window[1]) GUIEditor_Label[3] = guiCreateLabel(11,159,25,15,"By :",false,GUIEditor_Window[1]) GUIEditor_Label[4] = guiCreateLabel(37,160,101,18,"|S.s|SoRa",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[4],255,0,0) GUIEditor_Label[5] = guiCreateLabel(97,25,47,16,"Speed :",false,GUIEditor_Window[1]) sup = guiCreateButton(161,24,27,23,"+",false,GUIEditor_Window[1]) sdown = guiCreateButton(189,24,27,23,"-",false,GUIEditor_Window[1]) sn = guiCreateLabel(144,26,16,18,"0",false,GUIEditor_Window[1]) guiLabelSetColor(sn,0,255,0) GUIEditor_Label[7] = guiCreateLabel(220,26,50,18,"Volume :",false,GUIEditor_Window[1]) sv = guiCreateLabel(272,28,18,21,"0",false,GUIEditor_Window[1]) guiLabelSetColor(sv,255,255,0) vup = guiCreateButton(292,24,27,23,"+",false,GUIEditor_Window[1]) vdown = guiCreateButton(322,24,26,23,"-",false,GUIEditor_Window[1]) --[[ local volume = true local speed = true --]] local sound = true function onGuiClick (button, state, absoluteX, absoluteY) if (source == PlayStop) then if sound == true then local URL = guiGetText ( URLE ) sp = playSound(URL) outputChatBox ( "Sound loading maybe take time ...", getLocalPlayer(), 255, 0, 0, true ) outputChatBox ( "Sound starting !", getLocalPlayer, 255, 0, 0, true ) guiSetText(PlayStop,"Stop") sound = false else stopSound(sp) guiSetText(PlayStop,"Play") outputChatBox ( "Sound stopped !", getLocalPlayer(), 255, 0, 0, true ) guiSetText(sn,"1") guiSetText(sv,"1") sound = true end end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) function GuiClick (button, state, absoluteX, absoluteY) if (source == sup) then local ss = getSoundSpeed(sp)+1 while not setSoundSpeed ( sp, ss ) do ss = ss + 1 end guiSetText(sn,""..ss.."") elseif (source == sdown) then local ss = getSoundSpeed(sp)-1 while not setSoundSpeed ( sp, ss ) do ss = ss - 1 end guiSetText(sn,""..ss.."") elseif (source == vup) then local svol = getSoundVolume(sp)+1 while not setSoundVolume ( sp, svol ) do svol = svol + 1 end guiSetText(sv,""..svol.."") elseif (source == vdown) then local svol = getSoundVolume(sp)-1 while not setSoundVolume ( sp, svol ) do svol = svol -1 end guiSetText(sv,""..svol.."") end end addEventHandler ("onClientGUIClick", getRootElement(), GuiClick) function show() if guiGetVisible(GUIEditor_Window[1]) == true then guiSetVisible(GUIEditor_Window[1],false) showCursor(false) else guiSetVisible(GUIEditor_Window[1],true) showCursor(true) end end addCommandHandler("su",show)
×
×
  • Create New...