
xXMADEXx
Members-
Posts
2,718 -
Joined
-
Last visited
Everything posted by xXMADEXx
-
On the server side, when the player logins, you need to check if that player is in the required ACL. If they are, trigger a client event that will enable the shader. Functions/Events Required: --Server Side onPlayerLogin isObjectInACLGroup aclGetGroup triggerClientEvent -- Client addEvent addEventHandler
-
Please check your debugscript, and post any errors that are relevant to this script. /debugscript 3
-
If there's no output, then are you sure that the onBusinessCreate event is even being triggered?
-
Try this: addEventHandler("onPlayerDamage",root, function(attacker, weapon) if weapon == 8 and getElementType ( source ) ~= "ped" then killPed(source,attacker,weapon) end end)
-
Try this: local mysql = exports.mysql function createBusiness(getBusName) mysql:query_free("INSERT INTO business ( 'name' ) VALUES ( ? )", getBusName) outputChatBox("Congratulations, you have created your business", source, 255, 194, 14) end addEvent("onBusinessCreate", true) addEventHandler("onBusinessCreate", getRootElement(), createBusiness) If that doesn't work, try using this: local mysql = exports.mysql function createBusiness(getBusName) mysql:query_free("INSERT INTO business ( 'name' ) VALUES ( '".. getBusName .." )" ) outputChatBox("Congratulations, you have created your business", source, 255, 194, 14) end addEvent("onBusinessCreate", true) addEventHandler("onBusinessCreate", getRootElement(), createBusiness) However in the second one, unless the query_free function filters the query, sql injection will be possible. If the first one doesn't work, please post the query_free function.
-
No, you can't get account passwords. You'll have to create a custom account system which uses MySQL so that the database can be synched with MTA and the website.
-
Would you please give some details of what the script would need?
-
What you'll want to learn depends on what you want to be capable of. SQLite and MySQL have basically the same syntax (Very little differences). What it really comes down to is speed and accessibility. SQLite will be faster than MySQL because its a file directly on the file, however you cannot access these files from a website. MySQL offers PHPMyAdmin, so you can view the file from a web server, however it's a remote server so it will take a little more time to execute query's. Check this tutorial: viewtopic.php?f=148&t=38203
-
onClientVehicleDamage is a client only event. There doesn't need to be a player in the vehicle for it to be called. https://wiki.multitheftauto.com/OnClientVehicleDamage
-
Im not sure, but I think that setting the respawn time to 0 is the only way.
-
Give the function an name, then just remove the event handler for it. Here's an example: addEventHandler ( 'onClientPlayerDamage', root, cancelEvent ); setTimer ( removeEventHandler, 3000, 1, 'onClientPlayerDamage', root, cancelEvent );
-
List of functions or methods not accessible by Lua VM
xXMADEXx replied to Mr. Bubbles's topic in Scripting
You mean this? viewtopic.php?f=130&t=66921 -
So, what exactly is the problem?
-
Of-course, the host would be able to see anything on the VPS. However, most hosts encrypt passwords to make them more secure, so you shouldn't have to worry about that, but if you still do worry about it, you can just simply use a different password for anything related to it.
-
accountName sint defined, and you didnt end the if statements. function onPlayerSpawnHandler () local account = getPlayerAccount ( source ); if ( not account or isGuestAccount ( account ) ) then return false; end local accountName = getAccountName ( account ); if ( accountName and isObjectInACLGroup ( "user."..accountName, aclGetGroup ( "VIP" ) ) ) then setPedArmor ( source, 100 ); end end addEventHandler( "onPlayerSpawn", root, onPlayerSpawnHandler )
-
Yes, it's definitely possible. Instead of doing it so when you hit the object, you should create a small colshape around the object, this way you will be able to use the onClientColShapeHit event. Use these functions: getElementPosition createColCuboid createExplosion
-
I don't believe that cancelEvent works with this event.
-
Check the debug script. (/debugscript 3)
-
Just use the forum for help.
-
The only way to actually learn it, is by doing it, not just reading about it.
-
You need to use client-side scripting to create the GUI of-course. On the server side, create a marker, and in onMarkerHit check to see if the player is in the Admin ACL group with isObjectInACLGroup (see wiki for an example), and if they are trigger a client event (triggerClientEvent). On the client side, then you need to add the event, and handle it with a function that sets the GUI visibility to true.
-
You could use ACLs for this, but it would probably be easier to use teams with createTeam and then just disable friendly fire with setTeamFriendlyFire.
-
There's no specific way. It depends on how your server is scripted, and what features you want.
-
Check this. viewtopic.php?f=148&t=75501
-
Espanol: viewforum.php?f=122