PacMan
-
Posts
22 -
Joined
-
Last visited
Posts posted by PacMan
-
-
The reason is simple, when extracting data from XML file, all backslash (\) are duplicated.
-
This is bug http://bugs.mtasa.com/view.php?id=5301
-
function Radio (command, stationID) local result = setRadioChannel ( tonumber( stationID ) ) if result then -- if we had a valid ID outputChatBox ( "Changed your radio station to " .. stationID .. "!" ) else outputChatBox ( "Invalid radio station ID, valid ones are 0-12." ) end end addCommandHandler ("setradio", Radio) --How to use: setradio 5
this was unefficent, no need for getting channel if you already have its variable, also string interpolation makes tonumber() automaticly
In this case string interpolates C++, but not Lua, this must consider.
-
varez, you propose the wrong decision, when you convert nil in the number of remains nil.
The error says that you compare the number with nil value, this happens when you do not enter the transfer amount.
After the announcement of the function add "rrr = tonumber(rrr) or 0".
-
triggerClientEvent ( "onPlayerReSortMeTableRankMM", g_Root, countPlayersInMM, unpack(tablePlayersInMMnick), unpack(tablePlayersInMMpoints))
In this example, you are call two unpack functions together, the syntax Lua is unacceptable, you first have to pack everything into one table, and then unpack it.
-
Give and 200 and 10000 ammo, it does not affect.
Note that if don't called setPedControlState (ped, "aim_weapon", true), then fire is visible, but the bullets did not fly in the direction indicated setPedAimTarget (ped, 5, 5, 3), and in side as he was spawned, ie rotation don't work.
-
-
When godmode this event does not work.
-
Better still make a function similar to temporary login with obtaining rights as it is now using /login triggered event onPlayerLogin and leaving onPlayerLogout. When player logout ACL rights should automatically disappear.
For example:
playerLogin( player thePlayer, acl theAcl )
playerLogout( player thePlayer )
-
With these functions would be much easier, for example, take your "admin" resource. There are commands to administer the server, but to use them need ACL right, could simply get necessary rights and working with any resources.
You can certainly go the difficult way and write your own system for temporary obtaining of rights, constantly adding and removing user accounts and ACL rights, but agree it is not the best solution.
-
It would be nice if there were add scripting function for virtual set ACL rights for player at time of current game.
Something like:
setPlayerAclGroup (player thePlayer, string groupName, bool access)
Or:
loginAclGroup( player thePlayer, string groupName )
logoutAclGroup( player thePlayer )
That would be a good alternative use for its own account system.
-
Today I specifically tested cheats on weapons, if you give weapon to itself that you previously was not, you some time can go with it and then write Network Trobleshoting, while from it is impossible to kill. If you use client-side functions for get weapons/ammo write cheats ammo values, server-side functions write that you have weaponID 0 and writes number of ammo that you gave yourself. If script give to you any weapon, you can safely give yourself any number ammo, this number will be synchronized with the server, you can go with the infinite weapons and all kills.
-
The first step read wiki, but there is not complete information.
There not told and many other possibilities have to look at other resources.
-
I can not find nowhere complete information on EDF.
I am interested in what other child besides may contain the root element , saw a , is there still something like what is unspecified the wiki? Also, I would like to know the complete list of supported attributes for and . Tell me where can read about this?
-
It is possible to learn from you, really somehow to influence client scripts during their work, from client-side, that is to hack a script and to change all its logic? For example, to change work of any functions in client scripts, or to call client-side functions, for example setPlayerMoney which gives money to the player, or setElementPosition which teleports the player.
-
It's JSON - see http://www.json.org
So [[6,1]] is an array containing 6 and 1.
Now it is clear, thanks.
-
Tell me, please, how to enable spectating of the NPC?
I tried setCameraTarget, does not work, although it is written that supports the type of Peds.
-
Thanks for your help.
-
Tell me, please, what are the brackets in these examples, the syntax of XML or core MTA?
Where this can be read?
-
Does someone have compiled for Linux file king.so from the latest build of resources?
Nowhere else can not find it, near the compile fails.
-
Hello.
Help me to solve a problem with start GameMode, all time writes an error.
What am I doing wrong?
GameMode compatible with the server 1.0.3?
Where should be installed base and arenas?
wasEventCancelled returns false - always
in Scripting
Posted
Status wasEventCancelled changes only after all event handlers, and not during execution. Correspondingly wasEventCancelled can only be used after calling the event, using triggerEvent.