-
Posts
228 -
Joined
-
Last visited
Everything posted by Adde
-
Thanks Castillo, it works. You´re the man ;D Btw, should local account = getPlayerAccount(source) local accName1 = getAccountName ( account ) if isObjectInACLGroup ("user."..accName1, aclGetGroup ( "VIP" ) ) then not be used in client side? Because I am trying to make a GUI available for that ACL group.
-
Nah don´t work Same problem
-
It began good. I couldn´t spawn a new when the car was spawned. But I couldn´t spawn when it was blown neither
-
Hello I wounder how I can change this function so only 1 car can be spawned and used at the time. Example: spawns a car and can´t spawn a new untill that car is destroyed/blowed/in water. Or make it spawn/hide function spawnCar() if ( not isPedInVehicle ( source ) ) then local x, y, z = getElementPosition ( source ) local car = createVehicle ( 587, x, y, z ) setVehicleColor(car,20,20,20,30,30,30) warpPedIntoVehicle(source, car) setVehicleHeadLightColor(car,0,0,255) addVehicleSirens(car,1,2) setVehicleSirens(car,1,0,0.7,0.35,255,0,255) end end addEvent("vehicleSpawn",true) addEventHandler("vehicleSpawn",getRootElement(),spawnCar)
-
Oh, my bad. Should have thought about that. Is it not just checking if there is any timer running atm? Or is it checking if the timer is on 240000? Is this possible right? function onQuit ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then local timer = getTimerDetails( theTimer ) setAccountData ( playeraccount, "jailTimer", timer ) end end addEventHandler ( "onPlayerQuit", root, onQuit ) function onLogin () if ( playeraccount ) then local Timer = getAccountData ( playeraccount, "jailTimer" ) if ( Timer ) then setTimer(setElementPosition,"Timer",1,source,634.37,-567.09,16.33 ) end end end addEventHandler ( "onPlayerLogin", getRootElement ( ), onLogin)
-
Hello, I have a question. I am making a savesystem to my timer or how i should say. Is this close if I want to save the timer "onQuit" and then launch the rest next time the player login if the timer still was running onquit? I may have understood wiki wrong bcs I can´t figure it out. There are a lot like missiontimer also, but I choose this. Thankfull for answears. I have a function here, included: theTimer = setTimer(setElementPosition, 240000,1,x,y,z) then theese functions: function onQuit ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then if isTimer( theTimer ) then local timer = getTimerDetails( theTimer ) setAccountData ( playeraccount, "jailTimer", timer ) end end end addEventHandler ( "onPlayerQuit", root, onQuit ) function onLogin () if ( playeraccount ) then local Timer = getAccountData ( playeraccount, "jailTimer" ) if ( Timer ) then setTimer(setElementPosition,"timer",1,source,634.37,-567.09,16.33 ) end end end addEventHandler ( "onPlayerLogin", getRootElement ( ), onLogin)
-
Hey guys! I´ve got this wanted system, but there´s a bug I can´t fix. Can be something easy idk. Anyway, if a player commit suicide then he/she get one star (nothing in debug what I can see). I must add something that points "killer" on other players only right? So it wont count if the killer killed himself. Wanted script (server) --KILL REWARD PER STAR kreward = 150 function policeJob ( attacker, attackerweapon, bodypart, loss ) if attacker and getElementType(attacker) == "player" then theTeam = getPlayerTeam ( attacker ) local wlevel = getPlayerWantedLevel( source ) theSkin = getElementModel ( attacker ) if (attackerweapon == 3) and (loss > 2 ) and (wlevel > 0) then if getTeamName( theTeam ) == "Police Department" or getTeamName( theTeam ) == "Staff" or getTeamName( theTeam ) == "US Army" or getTeamName( theTeam ) == "US Marines" then setTimer( setElementPosition, 400,1,source, 264.74, 77.69, 1001.03 ) setTimer( setElementInterior, 400,1, source, 6 ) setTimer( setElementDimension, 400,1, source, 3 ) local theTimer = setTimer( setElementPosition,240400,1,source,634.37,-567.09,16.33 ) setTimer( setElementInterior,240400,1,source,0 ) setTimer( setElementDimension,240400,1,source,0 ) setTimer( setPlayerWantedLevel, 300400,1,source, 0) setTimer( toggleControl,400,1,source, "fire", false) setTimer( toggleControl,400,1,source, "next_weapon", false) setTimer( toggleControl,400,1,source, "previous_weapon", false) setTimer( toggleControl,400,1,source, "aim_weapon", false) setTimer( toggleControl,400,1,source, "vehicle_fire", false) setTimer( toggleControl,240400,1,source, "fire", true) setTimer( toggleControl,240400,1,source, "next_weapon", true) setTimer( toggleControl,240400,1,source, "previous_weapon", true) setTimer( toggleControl,240400,1,source, "aim_weapon", true) setTimer( toggleControl,240400,1,source, "vehicle_fire", true) theName = getPlayerName ( source ) theCop = getPlayerName ( attacker ) outputChatBox ( "You have been jailed by "..theCop.. " for 4 minutes.", source ) outputChatBox ( "You have jailed "..theName, attacker ) end local thisreward = wlevel*kreward givePlayerMoney ( attacker, thisreward ) setPlayerWantedLevel (source, 0) end end end addEventHandler ("onPlayerDamage", getRootElement(), policeJob) --WANTED LEVEL IF A PLAYER IS MURDERED BY A NON-COP, OR IF AN INNOCENT PERSON IS MURDERED BY A COP function aplayerdied( ammo, attacker, weapon, bodypart ) if ( attacker ) then local wlevel = getPlayerWantedLevel( source ) if wlevel > 0 then local kskin = getPlayerSkin ( attacker ) if kskin == 217 or kskin == 163 or kskin == 164 or kskin == 246 or kskin == 280 or kskin == 281 or kskin == 282 or kskin == 283 or kskin == 284 or kskin == 285 or kskin == 286 or kskin == 288 or kskin == 179 or kskin == 287 then return end end if ( getElementType( attacker ) == "player" ) then local wlevel = getPlayerWantedLevel( attacker ) if wlevel < 5 then setPlayerWantedLevel( attacker, wlevel+1 ) elseif wlevel == 6 then return end elseif ( getElementType( attacker ) == "vehicle" ) then thekiller = getVehicleController( attacker ) if ( thekiller ) then local wlevel = getPlayerWantedLevel ( thekiller ) if wlevel < 4 then setPlayerWantedLevel( thekiller, wlevel+1 ) end end end end end addEventHandler ( "onPlayerWasted", getRootElement(), aplayerdied ) --WANTED LEVEL IF A POLICE OFFICER IS ATTACKED function assaultinganofficer ( attacker, weapon, bodypart, loss ) local vskin = getPlayerSkin ( source ) if vskin == 217 or kskin == 163 or kskin == 164 or kskin == 246 or kskin == 280 or kskin == 281 or kskin == 282 or kskin == 283 or kskin == 284 or kskin == 285 or kskin == 286 or kskin == 288 or kskin == 179 or kskin == 287 then if ( attacker ) then if ( getElementType( attacker ) == "player" ) then local kskin = getPlayerSkin ( attacker ) if kskin == 217 or kskin == 163 or kskin == 164 or kskin == 246 or kskin == 280 or kskin == 281 or kskin == 282 or kskin == 283 or kskin == 284 or kskin == 285 or kskin == 286 or kskin == 288 or kskin == 179 or kskin == 287 then return end elseif ( getElementType( attacker ) == "vehicle" ) then thedriver = getVehicleController( attacker ) if ( thedriver ) then local kskin = getPlayerSkin ( thedriver ) if kskin == 217 or kskin == 163 or kskin == 164 or kskin == 246 or kskin == 280 or kskin == 281 or kskin == 282 or kskin == 283 or kskin == 284 or kskin == 285 or kskin == 286 or kskin == 288 or kskin == 179 or kskin == 287 then return end end end if (getElementData ( source, "justdamaged" ) ~= "yes") and (source ~= attacker) then setElementData ( source, "justdamaged", "yes" ) local damagereset = setTimer ( resethurt, 20000, 1, source ) if ( getElementType( attacker ) == "player" ) then local wlevel = getPlayerWantedLevel( attacker ) if wlevel < 2 then setPlayerWantedLevel( attacker, wlevel+1 ) end end elseif ( getElementType( attacker ) == "vehicle" ) then local thekiller = getVehicleController( attacker ) if (thekiller) then local wlevel = getPlayerWantedLevel ( thekiller ) if wlevel < 2 then setPlayerWantedLevel( thekiller, wlevel+1 ) end end end end end end addEventHandler ( "onPlayerDamage", getRootElement(), assaultinganofficer ) function resethurt(source) if (source) then setElementData ( source, "justdamaged", nil ) end end
-
"yea and you no wath (bad word) you and your stupid Sala Zombie server i seen bad servers but this is the worst" This was the answear I got from mare_carina/Marko when he was denied for admin application. This is one of the most unmatured behavior I have seen... I was nice when I told him that he didn´t pass the test/apply but yea... Btw, He said his english speaking skills was 10/10.. I don´t think so. Just wanted to share this with you guys ;P I hate this type of persons/players.
-
Have you checked community? https://community.multitheftauto.com/ind ... ls&id=6372 Then you just add a marker that will spawn a car if the player is in Taxi team.
-
I said that if something is missing or wrong please correct, I don´t remember the script I used long time ago so much. And I think that GamerDeMTA want to get an answear, haha. GamerDeMTA, you download zombiekills_scoreboard from community. Then you have to create a script by yourself with almost that code I wrote.
-
I used to have a script almost same as this you want. I don´t remember it very good but if you have the zombiekills_scoreboard resource you can do something like this: function 100kills(_, account) local kills = getAccountData ( account, "Zombiekills" ) if ( player == source ) then if ( kills == 100 ) then outputChatBox ( "You have killed 100zombies!!!", getLocalPlayer(), 255, 255, 255 ) end end If someone else see any errors or something missing please correct it.
-
Hello, I am planning to create a screen text for the time that´s left on a timer. Can I get any suggestion how I should do it? I read about it should be something like this: If I name the timer and then use that later.. thatTimer = setTimer ( setElementPosition, 30000, 2, x, y, z ) local screenWidth, screenHeight = guiGetScreenSize ( ) function timercount() getTimerDetails ( thatTimer ) If isTimer(thatTimer) then dxDrawText () addEventHandler("onClientRender", root, timercount) This is maybe far from done but this is some parts that I have read should be a part of it.
-
Thanks man But it doesn´t work for me
-
Hello! I have now published/opened version 2.2 of my server. The server is a mix between zombie and rpg. You have to play on the server to understand my kind of gamemode. Why did I choose a mix between zombie and rpg? Yes my dear MTA friends. I did it because I wanted it to be as much realistic as possible. I am still, and will keep doing, working on more realastic things and ways to make the server better. The server is published first time with version 2.2 today ( 5 July ) and I want as many players to join as possible. I also have a bonus for the people who join on the release date. You will get +$1500 more than the usual start money/you had before just to make you happy Yes, I hope you are interessted. Description of the server: You can join Police Department and kill zombies and jail wanted players. If you kill someone that´s wanted you will not get wanted, but if that player is unwanted then you will get wanted. You can be medic and kill zombies and heal players. You can be in Survivors team as ( escaped prisoner, gangster, camper and hobo ) and if you kill someone you will get wanted. You can be US Marine soldier or US Marine sniperman. You can be US Army soldier or Army sniperman. You have a level depended on how many zombies you have killed. You can buy weapons, cars, housevans, etc. On every teams spawn-area there is a safezone. (there may be some bugs, but that´s why i am watching you guys when you play on the server. You can also post bugs on forum "sala-forum.forumtion.co.uk" or ingame with /report.) Thank you for reading this / The owner of SALA:Zombiehunt Roleplay 2.2
-
I have a whole spawn script with that column, and I add your suggestion into that script.
-
That script didn´t even work Just trouble in debug.
-
Hello, I wounder how I add text in markers? is it something with DxDrawText and then attach that to marker or what? I haven´t understood that yet ^^
-
Well you need to add the lua file to the meta.xml.
-
you deleted Admin Group while you using the Panel by mistake be careful No I mean I downloaded a new acl file and admin panel resource and replaced them, then added acl rights to me again and. After that there was nothing wrong with admin panel
-
It works now, I had to add a new "admin" resource and new acl file
-
Yes it is in Admin group I will try that, but I have to keep my admin_main bcs I have edited that.
-
Hello, for a long time now I have had some problems with admin panel but I haven´t mind it. But now I think it´s to pain. The IP or serial isn´t showed in admin panel, Non of the buttons in the gui "Set Team" are working and I need to hide hole admin panel to hide that, I can not ban IP only serial and all players are not allways showed in admin panel gridlist. I got this in debug when i press on a player in gridlist: "admin_main:919: attempt to concetenate field "IP" (a nil value)". It can´t get ip bcs it´s a nil value and idk why. Nothing in debug when I try to set/create/delete team in admin panel and it don´t work. I got this in debug when i try to ban a player with IP: admin_server:836: access denied @ "getPlayerIP" admin_server:836: attempt to concenate a nil value Anyone get it?
