
NeXTreme
Members-
Posts
117 -
Joined
-
Last visited
Everything posted by NeXTreme
-
I really wonder where you "took some of the code from", since none of my public resources have this sort of code in them.
-
Aww. Another thing you can try then is change both scripts: Client-side function Scripting () triggerServerEvent("spawnPed", getLocalPlayer(),getLocalPlayer()) end Server-side function spawnPed (player) local x,y,z = getElementPosition (player) pedio = createPed (0, x-2, y+2, z) end addEvent("spawnPed", true) addEventHandler("spawnPed", getRootElement(),spawnPed)
-
I guess your problem is in the server-side part, I don't usually work with the source variable in events, but.... function spawnPed () -- No "source" in the function parameters here local x,y,z = getElementPosition (source) pedio = createPed (0, x-2, y+2, z) end addEvent("spawnPed", true) addEventHandler("spawnPed", getRootElement(),spawnPed)
-
Solved my problem. I encoded the PHP script file in ANSI, previously it was encoded in UTF-8. Try to do the same with that file of yours and see if it works
-
Ports work fine for me, and I'm using MTA 1.3. I don't know why it would work on 1.2 and not on 1.3, unless you maybe changed some settings in your router. Oh and, as for checking if your port is open... I'd suggest you use PortForward.com's checker, it was the only thing that accurately showed me if my port is open. http://portforward.com/help/portcheck.htm
-
I've made a new PHP file called "test.php" and put just a mta::doReturn in there, and it worked, it returned what it was supposed to. Funny thing is, I have this same code in the non-working script (with all other stuff commented out), and it doesn't return anything from there. WTF?
-
I don't know about the webhost, I have a couple other scripts that work perfectly.
-
I don't know, I'd say no I guess.
-
Well just happens I'm working with callRemote also, and my PHP script returns nil, like yours, no matter what the code is, and my only include is the MTA SDK. Go figure.
-
I have no idea what you want, try to explain it better?
-
Ah well I've solved the problem. It was a function that kept calling itself (which usually results in an error somewhat similar to to "too long execution, aborting script", I forgot how exactly it goes.). I guess that error message got me confused and I didn't really check the code well enough.
-
Well if there's another resource that intercepts chat messages, these two resources will both output a message by themselves (they don't know the other resource has already cancelled the chat event). If you want to get around this, I'd suggest you add the code from this chat filter to the freeroam resource, and make it filter the chat there.
-
You could use a matrix to do this on client side However, you could also do this: -- "vehicle" is the car that hit your marker -- "marker" is the marker that got hit (obviously) px,py,pz = getElementPosition(vehicle) rx,ry,rz = getElementRotation(vehicle) rz = rz -- change this to "rz = rz + 180" if you wish to move the marker to the other side of the car distanceFromVehicle = 7 -- how far away from the vehicle should the marker be mx = px + math.cos(math.rad(rz)) * distanceFromVehicle my = py + math.sin(math.rad(rz)) * distanceFromVehicle mz = pz setElementPosition(marker,mx,my,mz) Probably not the best code, but it should get the job done
-
Well I tried out your PHP script on my server (just the "test.php"), and I get an error Fatal error: Call to undefined function config_get() in /home/whocares/public_html/MTA/test.php on line 370 So it's either just me missing an include or whatever, or it's also on your side As far as my PHP knowledge goes, I think this should work.
-
Yeah hi, so do you have any other resource that might "intercept" chat messages? Like anti-spam?
-
This isn't so much of a help request, I'd just like to know what causes this error, if anyone knows. Happens whenever I click a GUI button in my script (and no, there aren't any intesive operations in the function it triggers, just an outputChatBox), also when I restart the resource my screen freezes for a second or two, and If I stay alt-tabbed out of MTA for a few minutes, my GTA just throws a runtime error and crashes. Cheers.
-
Yeah I realize that. I just attempted to fix the problem, not create a working script
-
Uhm, yeah... function rndColors() local color = {} color[1] = math.random(0,126) color[2] = math.random(0,126) color[3] = math.random(0,126) color[4] = math.random(0,126) setVehicleColor ( theVehicle, color[1], color[2], color[3], color[4] ) outputChatBox( "Enjoy the PARTY!", source, 0, 255, 0 ) end function makeTimer(player,command) theVehicle = getPedOccupiedVehicle( player ) if ( theVehicle == false ) then outputChatBox ( "Get into a vehicle first!", player, 255, 50, 0, true ) else setTimer( rndColors, 100, 1 ) outputChatBox ( "You are in vehicle!!", player, 255, 50, 0, true ) end end addCommandHandler(" discovehicle", makeTimer ) Thar?
-
Uhm yeah it's kinda hard for us to help if you post just one line of code?
-
I use fileDelete method alot, and seems to work just fine. Here's the "tutorial" about it viewtopic.php?f=148&t=36847
-
Hey. I have a bunch of SQL queries the server performs when saving data. Problem I'm having is some data might have a character like ' or " in the query, so the query will fail. I also don't want to use the executeSQLQuery's escaping system, those question mark things. What characters are actually being escaped in these SQL queries? I'd like a function for it, but I don't know which characters to escape Regards, NeXTreme
-
Your answer should be here viewtopic.php?f=91&t=39542
-
triggerServerEvent() addEvent() addEventHandler() That's what ya need. I'm not writing the whole code for you though
-
So this is SQLite I guess? If you know which columns you have duplicate: executeSQLQuery("DELETE FROM tableName WHERE forSale='yes' AND owner='Dave' LIMIT 1") The "LIMIT 1" is the key here, it limits the query to affect only one row This is what I know from MySQL, I don't know if it will work with SQLite also, I don't use it.