-
Posts
1,058 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Saml1er
-
I like your offer but I will be back on 1st April. I'll make it exactly how you want it to be but please if you can wait till 1st April then I'll make the whole game mode in 10 - 15 days. Its a guarantee from me that if you want to change something then I'll help you but well it depends on you if you can wait till that time.
-
First disable race vote manager in admin panel. addEventHandler("onPlayerFinish", getRootElement(), function (rank) if rank ~= 2 then return end outputChatBox (getPlayerName(source).." finished as 2nd player alive", getRootElement(), 255, 255, 0, false ) cancelEvent() -- so the map won't change or simply edit your race resource if you know scripting -- do your stuff end )
-
I don't know from where you got these parameters, but neither onClientWeaponFire nor onClientPlayerWeaponFire have these parameters. It was just an example to make him understand.
-
Well, you want to modify Sound for every weapon? You mean not like this? addEventHandler("onClientWeaponFire", getRootElement(), function (ammoInClip, reloadSoundEnabled) if(ammoInClip == 0 and reloadSoundEnabled)then pistolReload("sounds/weapon/pistole.wav", x,y,z) else local sound = playSound3D("sounds/weapon/pistole.wav", x,y,z) setSoundMaxDistance(sound, distance) end end )
-
Well I really want to help you but I don't have access to my pc but anyways you can also use SQL or setElementData to save the real time ( hour, minute ), year, month, day and you can remove the player from acl group by subtracting the new time by old time onPlayerJoin or by setTimer (getRealTime(), 300000, 0 )and thus you'll get the result. Its pretty easy if you try to do it in this way.
-
[lua] addEventHandler("onPlayerWasted", getRootElement(), function () local accName = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup ( "user."..accName, aclGetGroup ( "Admin" ), ) then setAccountData ( getPlayerAccount(source), "example.hh", "Noob") if getAccountData ( getPlayerAccount(source), "example.hh") == "Noob" then outputChatBox ("R.I.P; Admin: "..accName.." has died",getRootElement(), 255, 255, 0, false ) end end end)[/lua
-
You wasted your time then because it wrong and even if it was correct, if you restart the script everything will lost. Yeah, I saw your post after I submitted. ;/
-
I'm on mobile so can't help you with code but anyways you can use. -- I might type wrong name but search for those functions in wiki gn = "" Timer9 = "" Timer87 = "" addCommandHandler("add", DaysNname ) function DaysNname ( thePlayer, command, pname, groupname, Days ) local Days = tonumber ( Days ) if pname and groupname and Days then local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then aclGroupAddObject ( "user."..pname, aclGetGroup ( groupname ) ) -- Now use getTickCount() so you can manage 7 days for example startTick = getTickCount() local endTick = getTickCount() local tick = endTick - startTick local hours = ( ( endTick / 1000 ) / 60 ) / 60 gn = groupname Timer9 = Days * 24 Timer87 = hours end end end addEventHandler ("onPlayerJoin", getRootElement(), function ( ) if ppname == getPlayerName ( source ) then if Timer87 >= Timer9 then aclGroupRemoveObject (aclGetGroup ( gn ), "user."..getPlayerName ( source ) ) end end end ) Note : This is just an example, you should use SQL or xml for saving Player name, days and time.,
-
You can disable it from admin panel. Resources tab > Race > settings > you'll see votemanager and set it to false.
-
function yo () local u = getElementsByType ( "player" ) -- get all players for i,v in ipairs (u) do if getAccountData ( getPlayerAccount (v), "cu" ) == true then -- you can replace this true with whatever you used in setAccount Data but remember it should be between "" for example, "YOURTEXT" local theVehicle = getPedOccupiedVehicle ( v ) addVehicleUpgrade (theVehicle, 1000) -- upgrade value "1000" end end end addCommandHandler("upgrade", yo) Well for tables you should use table.insert
-
Ofc. Both languages are similar to each other , Indians and Muslims can use same board but there is a problem that Some indians start insulting Muslims and start fighting , talking about our GOD . So we are not mad that we will always listen them . There are many indians I've seen in MTA whenever I join in server they start talking about my religion etc and After that I start insulting them too . So I am not sure that we both can use same board , But If indians will not start So It will be good to use same board we can spread more knowledge here . I've seen good indians too . They are good and polite but some are not . Every time An Indian start insult But If they will not fight with us So We can use same board . How can you say indians don't visit MTA forum? I've seen more than 20 indians in DDC community.
-
Ofc. Both languages are similar to each other , Indians and Muslims can use same board but there is a problem that Some indians start insulting Muslims and start fighting , talking about our GOD . So we are not mad that we will always listen them . There are many indians I've seen in MTA whenever I join in server they start talking about my religion etc and After that I start insulting them too . So I am not sure that we both can use same board , But If indians will not start So It will be good to use same board we can spread more knowledge here . I've seen good indians too . They are good and polite but some are not . Every time An Indian start insult But If they will not fight with us So We can use same board . How can you say indians don't visit MTA forum? I've seen more than 20 indians in DDC community.
-
Finally, its solved.
-
Urdu = Hindi. When you write in English, they are same. So we can help two countries atm.
-
They do work. I saw this in sigmar lobby script.
-
Are you talking about brackets?
-
Show us the code. Don't show the whole script but just the part you want to change.
-
You can make your own log file and saving every message when the player Execute "say" command. I mean when you press T button and hit enter then you automatically execute "say" command. You can save all the logs by getting the current time and the player message in a txt file. You can use fileCreate(), fileOpen(), fileWrite(), fileClose() for this purpose. This is the way I did it.
-
Well you are loading code from a lua file, can't you just simply use brackets and send the data? I mean -- Client Sided local Bonsai = [[ -- Your code -- blah -- bah ]] addEventHandler("onResourceStart",getRootElement(), function () triggerServerEvent ("onSendCode", getLocalPlayer(), Bonsai ) end) -- Server Sided addEvent ("onSendCode", true ) addEventHandler ("onSendCode", getRootElement(), function(commandstring) local notReturned local commandFunction, errorMsg = loadstring("return "..commandstring) if errorMsg then notReturned = true commandFunction, errorMsg = loadstring(commandstring) end if errorMsg then outputDebugString(errorMsg); return end results = { pcall(commandFunction) } if not results[1] then return end if not notReturned then local resultsString = "" local first = true for i = 2, #results do if first then first = false else resultsString = resultsString..", " end local resultType = type(results[i]) if isElement(results[i]) then resultType = "element:"..getElementType(results[i]) end resultsString = resultsString..tostring(results[i]).." ["..resultType.."]" end outputDebugString(errorMsg); elseif not errorMsg then outputChatBox("See? It works", getRootElement(), 255, 255, 0, false ) end end)
-
It's not a requirement, but doesn't mean it can't be there. This doesn't make sense. If the player is not in admin group then he's already in Everyone's group so "elseif" statement shouldn't be used here. Here: local staff = createTeam("Staff", 126, 0, 145) local Regular = createTeam("Regular", 169,169,169) addEventHandler("onPlayerLogin", root, function(_, acc) local accName = getAccountName(acc) if isObjectInACLGroup("user."..accName, aclGetGroup("Admin")) then setPlayerTeam(source, staff) else -- If you want to know that if the player is in Moderator or any other group then you can use elseif. setPlayerTeam(source, Regular) end end I understand that but it will confuse people new to lua. I mean they'll think that else and elseif are same. I'm saying this because there was time when I couldn't understand how lua works for mta and such things got me more confused.
-
Hello, I made a level system same as DDC. Levels: 2, 4, 5, 6, 7, 8, 10, 11. It has the same commands like DDC but I'll update this script with new commands when I get free time. This is my own code and this script is not leaked/stolen. The main command is /admins It will output a list of online admins. So the new commands are: /setlvl Dreddy 5 - Adds dreddy to admin group lvl 5 /setlvl Dreddy 0 - Removes him from any admin group. /boom Halfscoper - Booms the player /deletetime 5 - deletes top time #5 /qm johnny - mutes a player named johnny for 30 seconds /push Sam - Pushes a player named Sam /smash LithuaN - Smashes a player named LithuaN /c 3 - starts countdown from 3 ( 3,2,1, GO! ) /c 5 - starts countdown from 5 ( 5,4,3,2,1, GO! ) /warp player - warps you to the player ( vehicle. ) /here player - warps the player to you ( vehicle. ) NOTE: Remember to replace your acl.xml with my acl.xml which is in the resource. Also remember to extract the files to a folder and name it "Levels" and add your self in the acl under group 11. Since it will give you full access.Download!
-
This doesn't make sense. If the player is not in admin group then he's already in Everyone's group so "elseif" statement shouldn't be used here. Here: local staff = createTeam("Staff", 126, 0, 145) local Regular = createTeam("Regular", 169,169,169) addEventHandler("onPlayerLogin", root, function(_, acc) local accName = getAccountName(acc) if isObjectInACLGroup("user."..accName, aclGetGroup("Admin")) then setPlayerTeam(source, staff) else -- If you want to know that if the player is in Moderator or any other group then you can use elseif. setPlayerTeam(source, Regular) end end