
myonlake
Members-
Posts
2,312 -
Joined
-
Days Won
41
Everything posted by myonlake
-
As MFNONFIK said, it will only be seen by the client. Use server-side to sync for all clients. For example use a server event trigger.
-
Another one is Basic Roleplay and the follower Another Basic Roleplay.
-
No. You need to have ONLY ONE in /modules and ONLY ONE in /server. Also, if you haven't already, you need to get the MySQL library and put it in the /deathmatch folder. http://code.google.com/p/multitheftauto ... l&can=2&q=
-
In that case you have no meta.xml, no resource, no correct file or haven't started the resource. You also have to make sure all this is server-side. Your command "test" should display either "FAIL" or "You have successfully...".
-
You also had the command handler's arguments wrongly defined. First comes the player, then the command. You had it the wrong way. Try this. addEventHandler("onResourceStart", resourceRoot, function() if not exports.mysql:create_table('characters', { { name = 'characterID', type = 'int(10) unsigned', auto_increment = true, primary_key = true }, { name = 'characterName', type = 'varchar(22)' }, }) then cancelEvent() return end end ) addCommandHandler("test", function(player, cmd) local result = exports.mysql:query_free("INSERT INTO characters (characterName) VALUES ('John Smith')") if result then outputChatBox("You have succesfully inserted new character", player, 0, 255, 0, false) else outputChatBox("FAIL", player, 255, 0, 0, false) end end )
-
addEventHandler( "onResourceStart", resourceRoot, function( ) if not exports.mysql:create_table( 'characters', { { name = 'characterID', type = 'int(10) unsigned', auto_increment = true, primary_key = true }, { name = 'characterName', type = 'varchar(22)' }, } ) then cancelEvent( ) return end end) function testQueryFree(command, player) local result = exports.mysql:query_free("INSERT INTO characters (characterName) VALUES ('John Smith')") if result then outputChatBox("You have succesfully inserted new character", player, 255, 255, 255) else outputChatBox("FAIL", player, 255, 255, 255) end end addCommandHandler("test", testQueryFree) You forgot the upper dot, whatever it's called.
-
The script doesn't know if the gate is moving or not. This should work, not tested though. phq1 = createObject(968, 1544.699, -1630.798, 13.100, 0, 88.9, 90) phq1col = createColCircle(1542.699, -1630.798, 13.100, 7) moving = false movetime = 968 addEventHandler("onColShapeHit", phq1col, function(hitElement, matchingDimension) if getElementType(hitElement) == "player" and matchingDimension then if getElementModel(hitElement) == 0 then if moving == false then moveObject(phq1, movetime, 1544.699, -1630.798, 13.100, 0, 0, 90) moving = true setTimer(function() moving = false end, movetime, 1) end end end end ) addEventHandler("onColShapeLeave", phq1col, function(hitElement, matchingDimension) if getElementType(hitElement) == "player" and matchingDimension then if getElementModel(hitElement) == 0 then if moving == false then moveObject (phq1, movetime, 1544.699, -1630.798, 13.100, 0, 88.9, 90) moving = true setTimer(function() moving = false end, movetime, 1) end end end end )
-
To make it easier you can use this. It uses the GTA sound library. playSoundFrontEnd If you want to use your own sound, you can use these following ones. playSound playSound3D
-
Actual video is not possible to be streamed into MTA, but you can use shaders to make it worth of watching. I think you can make holograms with shaders, and then use peds to make a movie and then delete them after the movie has finished. It is also possible to create that last one. Just check the player's position and rotation, change the ped's control states so that it walks towards you.
-
Hey, Got this annoying thing once again, which seems to be bugged, in my opinion. scripts.log [2012-11-03 15:53:50] ERROR: abrp-factions\s_factions.lua:226: xmlLoadFile failed; ModifyOtherObjects in ACL denied resource abrp-factions to access abrp-system [2012-11-03 15:53:50] WARNING: abrp-factions\s_factions.lua:229: Bad argument @ 'xmlNodeGetChildren' [2012-11-03 15:53:50] ERROR: abrp-factions\s_factions.lua:229: bad argument #1 to 'ipairs' (table expected, got boolean) acl.xml <acl> <group name="Default Group"> <acl name="Default" /> <object name="user.*" /> <object name="resource.*" /> </group> <acl name="Default"> <right name="command.*" access="true"></right> <right name="function.*" access="true"></right> <right name="general.*" access="true"></right> </acl> </acl> s_factions.lua local characters = xmlLoadFile(":abrp-system/xml/characters.xml") Any fix? I can't pretty much continue with this before this has been fixed. EDIT: After testing aclrequest allow abrp-factions all via Console, I get this message to my server.log. [2012-11-03 16:03:54] aclrequest: No change required
-
If you want to use it server-side, you could use triggers. triggerClientEvent triggerServerEvent
-
Show us the code you are using.
-
https://wiki.multitheftauto.com/wiki/Modules/MTA-MySQL It has a note on it which tells you what to do. Download the file from here: http://www.2shared.com/file/mklzX0am/li ... entso.html.
-
nPizzaFound isn't getting moved to server-side over there, it stays client-side. I have been facing the same problem for months and I don't get how people fix it. Wait for someone to give you tips, I'll be waiting as well.
-
if (array[j] == nil) then I don't think "then" and "if" can be on separate lines. You need to have it all in one line. Use this.
-
No need for an event nor alpha set. Also make sure you are in dimension one and if it's a map, I suggest adding some decimals to the z-coordinate so it lands on the map as it loads - or freeze the ped. local ped1 = createPed(87, -285, 1206, 74) setElementDimension(ped1, 1)
-
Wrong interior or dimension I assume.
-
Damn eeet. Everything is made so easy nowadays in MTA Not complaining though. I just tend to look at the hardest ways I guess, lol.
-
It surely is possible, but it needs a lot of work and scripting skills to make it fully working.
-
I am afraid that your knowledge won't allow you to add new features to it. Better write extensions instead. Dont get it It means you don't know how to script such stuff.
-
No problem!
-
'thePlayer' isn't defined, you must use 'source'. It looks like you just missed it, happens often to me as well addEventHandler("onPlayerWasted", root, function playerWasted(ammo, killer, weapon, bodypart, stealth) local team = getPlayerTeam (source) if (team == teamBorderControl) then spawnPlayer(source, -1346, -213, 14.1484375, 0, 71, 0, 0, teamBorderControl) end end ) -- For the alive team members, try this. This is just an example by the way. Commands /teammates - Outputs alive team members, if none found, outputs none Server-side function getAlivePlayersInTeam(player) result = false outputChatBox("Alive players in your team:", player, 255, 180, 0, false) for i,v in ipairs(getPlayersInTeam(getPlayerTeam(player))) do if not isPedDead(v) then outputChatBox(" " .. getPlayerName(v), player, 255, 180, 0, false) result = true end end if result == false then outputChatBox(" No alive players in your team.", player, 255, 0, 0, false) end end addCommandHandler("teammates", function(player, cmd) if getPlayerTeam(player) then getAlivePlayersInTeam(player) end end ) For the check only, use this: Server-side for i,v in ipairs(getPlayersInTeam(teamPolice)) do -- Get the players from team 'teamPolice' if not isPedDead(v) then return true -- Is the player alive? else return false -- Is the player dead? end end -- For the players to show on radar, as in, blips. You could use the 'playerblips' resource, which comes from the default resource package (download the latest package here »).
-
Learn English and stop fooling around with Google translator. You could also find your own first language's section on forums.