
alex11
Members-
Posts
15 -
Joined
-
Last visited
alex11's Achievements

Square (6/54)
0
Reputation
-
<setting name="*weapons/vehiclesenabled" value="false" /> <!-- Can players fire vehicle weapons? --> <setting name="*weapons/disallowed" value="[[38]]" /> <setting name="*weapons/disallowed" value="[[33]]" /> <setting name="*weapons/disallowed" value="[[34]]" /> <setting name="*weapons/disallowed" value="[[35]]" /> <setting name="*weapons/disallowed" value="[[36]]" /> <setting name="*weapons/disallowed" value="[[37]]" /> I am try to this XML,And when I am in the game,just only first Line of disallow WeaponID:38(minigun) not allow,And the other can get weapon from freeroam weapon list.
-
local spawnX = 2496 local spawnY = -1684 local spawnZ = 14 function weaponSwitchDisableMyWeapon ( previousWeaponID, currentWeaponID) --when a player switches his weapon if currentWeaponID == 38 or currentWeaponID == 36 then --if the weapon ID is minigun toggleControl ( source, "fire", false ) --disable the fire button toggleControl ( source, "action", false ) --disable the fire button else --otherwise toggleControl ( source, "fire", true ) --enable it toggleControl ( source, "action", true ) --disable the fire button end if (isAdminAccount(getClientAccount ( source )) == true) then toggleControl ( source, "fire", true ) --enable it toggleControl ( source, "action", true ) --disable the fire button end end --add an event handler for onPlayerWeaponSwitch addEventHandler ( "onPlayerWeaponSwitch", getRootElement(), weaponSwitchDisableMyWeapon ) function isAdminAccount(account) local nick = "" local group = aclGetGroup("Admin") if (account and group) then nick = string.lower(getAccountName(account) or "") for _, object in ipairs(aclGroupListObjects(group) or {}) do if (gettok(object, 1, string.byte('.')) == "user") then if (nick == string.lower(gettok(object, 2, string.byte('.')))) then return true end end end end return false end function giveWeaponsOnMyEvent ( ) giveWeapon ( source, 5, 1 ) giveWeapon ( source, 22, 35 ) giveWeapon ( source, 25, 32 ) giveWeapon ( source, 29, 200 ) giveWeapon ( source, 31, 100 ) --giveWeapon ( source, 17, 25 ) --giveWeapon ( source, 42, 500 ) end addEventHandler ( "onPlayerJoin", getRootElement(), giveWeaponsOnMyEvent ) -- attach the event handler addEventHandler ( "onPlayerWasted", getRootElement(), giveWeaponsOnMyEvent ) -- attach the event handler addEventHandler ( "onPlayerSpawn", getRootElement(), giveWeaponsOnMyEvent ) function Wait_Timer ( ) end function player_Wasted_Spawn () setTimer ( Wait_Timer, 3000, 1, "Hello, World!" ) spawnPlayer(source,spawnX,spawnY,spawnZ) end addEventHandler ( "onPlayerWasted", getRootElement(), player_Wasted_Spawn ) This is Finish...but Player be kill,that's no delay goto CJ old safe hose. And lock Action(TAB),if player use minigun,Press Mouse Right button,and Press TAB(Action),it will fire... so lock TAB(Action)
-
myrules.lua function weaponSwitchDisableMinigun ( previousWeaponID, currentWeaponID, thePlayer ) --when a player switches his weapon if currentWeaponID == 38 then --if the weapon ID is minigun toggleControl ( source, "fire", false ) --disable the fire button else --otherwise toggleControl ( source, "fire", true ) --enable it end if (isAdminAccount(getClientAccount ( thePlayer )) == true) then toggleControl ( source, "fire", true ) --enable it end end function isAdminAccount(account) local nick = "" local group = aclGetGroup("Admin") if (account and group) then nick = string.lower(getAccountName(account) or "") for _, object in ipairs(aclGroupListObjects(group) or {}) do if (gettok(object, 1, string.byte('.')) == "user") then if (nick == string.lower(gettok(object, 2, string.byte('.')))) then return true end end end end return false end --add an event handler for onPlayerWeaponSwitch addEventHandler ( "onPlayerWeaponSwitch", getRootElement(), weaponSwitchDisableMinigun ) myrules.lua and [uVA]Bart Give me his lua will Show same error messages. ERROR MESSAGE SHOW ON CONSOLE [23:50:48] WARNING: myrules.server.lua: Bad argument @ 'getClientAccount' - Line: 9 what's happen?
-
My server have Install logingui resources.Every One have they own Account. function weaponSwitchDisableMinigun ( previousWeaponID, currentWeaponID, thePlayer ) --when a player switches his weapon if currentWeaponID == 38 then --if the weapon ID is minigun toggleControl ( source, "fire", false ) --disable the fire button else --otherwise toggleControl ( source, "fire", true ) --enable it end local taccount = getClientAccount ( thePlayer ) if isAdminAccount(taccount) then toggleControl ( source, "fire", true ) --enable it end end function isAdminAccount(account) local nick = "" local group = aclGetGroup("Admin") if (account and group) then nick = string.lower(getAccountName(account) or "") for _, object in ipairs(aclGroupListObjects(group) or {}) do if (gettok(object, 1, string.byte('.')) == "user") then if (nick == string.lower(gettok(object, 2, string.byte('.')))) then return true end end end end return false end --add an event handler for onPlayerWeaponSwitch addEventHandler ( "onPlayerWeaponSwitch", getRootElement(), weaponSwitchDisableMinigun ) It's can't work.
-
My serial is 0000-0000-0000-0000 Under the XML,where did I Add in which file? <admins> <admin Serial="0000-0000-0000-0000"/> <admin Serial="0000-0000-0000-0000"/> </admins>
-
This Script got from MTA-Wiki,and I am try to Add Only Admin can use minigun. function weaponSwitchDisableMinigun ( previousWeaponID, currentWeaponID, thePlayer ) --when a player switches his weapon if currentWeaponID == 38 then --if the weapon ID is minigun toggleControl ( source, "fire", false ) --disable the fire button else --otherwise toggleControl ( source, "fire", true ) --enable it end if getClientName(thePlayer) == "MyNickname" then toggleControl ( source, "fire", true ) --enable it end end --add an event handler for onPlayerWeaponSwitch addEventHandler ( "onPlayerWeaponSwitch", getRootElement(), weaponSwitchDisableMinigun ) I try write this script get PlayerName is Admin Name can use minigun,but it was not work. I want to write it,Only AdminGroup Can use minigun. Please,Help me~
-
I find the problem. i am say the Next time i connect my server it will auto-login. i find account.xml,1,1 replace 0,Now logingui it's can work.
-
yes,i do. I have Administertor function,I can admin my server by Webpage and In Game use admin GUI.
-
like this ? When Account Not exist It will Add new Account,Next time I am Connect to my server,It's say Account is exist,Please enter your Password,and chatbox say,You Successfully logined. and I am type correct password,it's say Your Password is Incorrect.and over 3 times it's kick by Console.
-
if You download freeroam Gamemode from MTA website,You can do the next fix. If player using /wp 550 9999,Get minigun. you can extract file from freeroam.zip using Notepad Open fr_client.lua file fine function giveWeaponCommand(cmd, weapon, amount) weapon = weapon and tonumber(weapon) if not weapon then return end if not amount then amount = 500 else amount = tonumber(amount) end if amount then server.giveMeWeapon(weapon, amount) end end addCommandHandler('give', giveWeaponCommand) addCommandHandler('wp', giveWeaponCommand) replace or modify function giveWeaponCommand(cmd, weapon, amount) weapon = weapon and tonumber(weapon) if not weapon then return end if not amount then amount = 500 else amount = tonumber(amount) end if amount then server.giveMeWeapon(weapon, amount) end end --addCommandHandler('give', giveWeaponCommand) --addCommandHandler('wp', giveWeaponCommand)
-
I am download logingui frmo mta website. https://community.multitheftauto.com/index.php?p= ... ils&id=174 and I am modily acl.xml add logingui.zip put in resources directory. start MTA-Server,and gamemode freeroam,and logingui. Now if use NewAccount it's can Login and Create a New account. and Next time login to my server,chatbox say auto-login:you successfully logined. and the Login form,username is fixd,Password I enter my password,login form say:Incorrect password. but i useing notepad open account.xml username and password is correct i enter on the login form. passowrd error 3 times,and It's auto kick me on the Console. why it will auto-login? and i enter correct username and password it's say Incorrect password?
-
strange problem,when enter my server is black screen
alex11 replied to alex11's topic in DM Server-side
thanks a lot. mtaserver.conf 1 Set Empty don't type any word.My Server can be login. Today I play a RPG Server,player can be police,robber,taxi driver,etc...,I Download MTA-Server ver1 dp 2.0 from MTA-SA website is it include I say RPG Gamemode or I will download RPG resources in My MTA? -
strange problem,when enter my server is black screen
alex11 replied to alex11's topic in DM Server-side
Now I type "gamemode interstate69 i69-de",but it halt download file process. Error Messages is "Error downloading requests files". I think need Http Server.So i start Apache2 Server. Click URL View Pictures. http://hollowaysxp.myweb.hinet.net/mta/Apache2inmta.JPG But it still Show "Error downloading requests files". mtaserver.conf settings <httpserver>1</httpserver> <httpport>22005</httpport> <httpdownload>1</httpdownload> <httpdownloadurl>http://xxx.xxx.xxx.xxx/resources/</httpdownloadurl> <- This URL is available on My Computer Start Apache2 this is for First Question. And about Second Question,On this topic first I writed, This Pictures http://hollowaysxp.myweb.hinet.net/mta/MTA-webadmin.JPG I have addtion port at http://xxx.xxx.xxx:portNumber/ ,The port Number I Am Mask on the Pictures. It's Show Login Form,requests me to type username and password,So i just Want to know default username and password,and I want to know modify default username and password. I want to know,What's username and Password can I Loing MTA Web-Admin? I Want authentication Login in this Pags,If type wrong username and password,It show "Access denied, please login". EDIT:I am modify account.xml Add this and modify acl.xml <group name="Admin"> <acl name="Moderator"/> <acl name="SuperModerator"/> <acl name="Admin"/> <acl name="RPC"/> <object name="user.myusername"/> </group> Now I Can useing FireFox Login the MTA WebAdmin. So My First Question,When I Play MTA Connected to My MTA Server,It's will download some Files,but it's Show Error Messages say:Error downloading requests files". thank a lot. -
I am download MTA-SERVER dp1.0 v2. use notepad modify "mtaserver.conf",I modify andand,the other I haven't modify it. and I modify accounts.xml,add acl.xml settings.xml file size is 0KB,no any word in this settings.xml. Start MTA Server.exe =========================================================== = Multi Theft Auto: San Andreas Deathmatch v1.0-dp2 = =========================================================== = Server name : xxx MTA Server = Server IP address : xxx.xxx.xxx.xxx (I am testing,I useing private class C IP-192.168.xx.xx) = Server port : xxxx = = Log file : ../MTA-Server/mods/deathmatch/logs/server.log = Maximum players : 32 = MTU packet size : 1264 =========================================================== [20:22:39] Could not parse 'settings.xml' file (). Starting with an empty settings registry. [20:22:43] Resources: 100 loaded, 0 failed [20:22:44] Starting resources............ [20:22:44] Server password set to 'xxxxx' [20:22:45] All Seeing Eye listing enabled. Port 22127 (UDP) must be accessible from the internet [20:22:45] Querying game-monitor.com master server... success! [20:22:46] Server started and is ready to accept connections! when I Start Play in MTA,Quick Connect to My server,wait for 3 min, i Can see some word And black screen. Click URL to View Pictures. http://hollowaysxp.myweb.hinet.net/mta/ ... myself.JPG This is My first Question. and Second Question is I want to know MTA WebAdmin default username and password? Click URL to View Pictures. http://hollowaysxp.myweb.hinet.net/mta/MTA-webadmin.JPG How can I modify Default username and password in which document? thanks a lot.
-
Sorry,I am post wrong category.