
GamingTim
Members-
Posts
55 -
Joined
-
Last visited
Everything posted by GamingTim
-
Alright so whenever a player respawns, their weapon would be disarmed. What are the functions/events needed to cancel that?.
-
First, make a folder and name it whatever you want then do the following 1.)create a text file in the folder, open it, save as a .lua file in the folder you created.Name your lua file when saving, exmaple team.lua but i'd suggest server.lua 2.)create a text file, save it as meta.xml. Make sure it's meta.xml. 3.)Then open your .lua file and enter the following - function aTeam () Admin = createTeam ( "Admins", 255,255,255 ) end addEventHandler("onResourceStart", resourceRoot, aTeam) Change the "Admins" to any Team name that you want and change the 255,255,255 to change the team color. 4.)enter your .xml and type in the following <meta> <info author="YourName" type="script" description="Your description" /> <script src="server.lua" /> </meta> 5.)Make sure you saved' both files 6.)Copy the folder you created for the script and paste it here -->mods/deathmatch/resources/gameplay and paste it there. 7.)Turn on your server and enable the script. I'm a new scripter as well, just trying to help, it's how i do scripts, steps might be long but it should work hopefully, good luck!.
-
Yeah i'll remove that thanks for telling.
-
I usually make noob punctuation and case sensitive errors, thanks alot!
-
Well here's the code, I tested it,no errors but the weird thing is that it doesnt output the text to a player. [code=text]function setAdminTeam (player, command) local accName = getAccountName (getPlayerAccount (player)) if isObjectInACLGroup("user."..accName, aclGetGroup ("Admin")) then setPlayerTeam (player, Admin) else outputChatbox ( "Ha, you're not an admin.", player) end end addCommandHandler("togadmin",setAdminTeam) addEventHandler("onPlayerCommand",root,setAdminTeam) [/code]
-
The name seems fammiliar why dont you guys think of a unique name ...
-
So i've thought of learning mysql but i'm also learning mta lua which confuses me at some points as i'm a fairly slow learner. Anyway, is it possible to save a player's data on your pc? So that when your server restarts, data will be saved instead of save system to be restarted and stats ressetted to 0
-
I just need the functions/events needed for this to work.
-
Well i thought of a multi gamemode but a simplified version, nothing advance etc and not redirecting to another server it's like multi gamemodes in one server I wanted to make gamemodes start on a different dimension that's all i just need the functions/ events needed.
-
Okay so, i'm not too sure on how to start a gamemode on another diemension, like for example, in the main world there's a lobby, also there's a race gamemode on another dimension and stunts in another dimension. I'm currently looking on this function setElementDimension, what other fucntions, events shall i use?.
-
Thanks alot mate!
-
Thanks but it didn't work so i changed the onPlayerJoin to onPlayerLogin still the same.
-
Alright i'm totally new to coding but i know "some" basics. I'm not sure on how to set a player to an admin team if he's an admin when he joins. I created a team on the default MTA admin panel but when I reconnect it doesn't set the player which was added as an admin to the admin team. what code should I add? or which ones should i use?
-
Sane Hosting - DDoS Protected - Cheap and Reliable
GamingTim replied to SaneHosting's topic in Hosting solutions
Even if my server's down, it's caused by Sane-hosting updating the website and stuff, My server was only down for a day and there's no problem afterwards, i've been on Sane-hosting for a month, No problem at all, even if my server's offline it's because i made mistakes on the acl file etc. -
I edited and added the stuff needed, does this still makes sense?| V exports.scoreboard:addScoreboardColumn('Money') addEventHandler("onPlayerQuit",root, function GetPlayerMoney(player) local account = getPlayerAccount(player) if isGuestAccount(account) then return end local getPlayermoney = getAccountData(account,"getPlayerMoney") if not player then setAccountData(account,"getPlayerMoney",0) end end addEventHandler("onPlayerLogin",root, function () local account = getPlayerAccount(source) if isGuestAccount(account) then return end local getPlayerMoney = getAccountData(account,"getPlayerMoney") if getPlayerMoney then setElementData(source,"setPlayerMoney",tostring(player)) else setElementData(source,"setPlayerMoney",0) end end)
-
exports.scoreboard:addScoreboardColumn('Money') function GetPlayerMoney(player) local account = getPlayerAccount(player) if isGuestAccount(account) then return end local GetPlayermoney = getAccountData(account,"GetPlayerMoney") if not player then setAccountData(account,"GetPlayerMoney",0) end addEventHandler("onPlayerLogin",root, function () local account = getPlayerAccount(source) if isGuestAccount(account) then return end local GetPlayerMoney = getAccountData(account,"GetPlayerMoney") if GetPlayerMoney then setElementData(source,"GetPlayerMoney",tostring(player)) else setElementData(source,"GetPlayerMoney",0) end end)
-
I've got the Zday resource but I'm not really sure on how do I set it so that the zombies would spawn only on the specific spawnpoints that I'm going to add. I can't seem to find which line to place the code and stuff, help?.
-
No errors
-
I used this but, it doesen't show anything on my scoreboard, not even the money "tab"
-
I'm learning slowly but i'm trying to make this simple script to work, it didn't work but only showed me the "money" tab on the scoreboard but I don't get the player's money when they join also I wanted to save the player's money when they quit. here's the code and idk how to fix it. exports.scoreboard:addScoreboardColumn('Money') function GetPlayerMoney(player) local account = getPlayerAccount(player) if isGuestAccount(account) then return end local GetPlayermoney = getAccountData(account,"GetPlayerMoney") if not GetPlayerMoney then setAccountData(account,"GetPlayerMoney",0) end end addEventHandler("onPlayerLogin",root, function () local account = getPlayerAccount(source) if isGuestAccount(account) then return end local GetPlayerMoney = getAccountData(account,"GetPlayerMoney") if GetPlayerMoney then setElementData(source,"GetPlayerMoney",tostring(player)) else setElementData(source,"GetPlayerMoney",0) end end)
-
Your scripts must be really awesome and also a trusted person, hope somone buys your scripts mate!
-
Sane Hosting - DDoS Protected - Cheap and Reliable
GamingTim replied to SaneHosting's topic in Hosting solutions
You guys should get this company to host for your MTA server's they provide 24/7 support and I haven't got any problems with installing resources and stuff. It's like 10 cents per slot, Cheap and also they care for their customers. - Tim -
Got the Same problem here..
-
Hopefully this goes on, I'm really interested in this gamemode!
-
Is it possible to add a custom skin instead of replacing the default? if yes what function do i have to use etc..?