-
Posts
127 -
Joined
-
Last visited
Everything posted by Dev
-
Ah yea, works now! thanks mate. I thought the html and body tags were necessary.
-
Hey, So, I've been trying to make this example work on the wiki page for PHP SDK, I have Apache 2.2 and PHP 5.3 installed and successfully running on my PC, I also have the PHP SDK files in my htdocs folder of Apache along with this new call.php file I just created, but for some reason it is only returning 'nil'. If someone has any idea or past experiences with SDK, please help me out. -- call.lua function result(sum) if sum ~= "ERROR" then outputDebugString(tostring(sum)) end end function phpCall( ) callRemote ( "localhost:80/call.php", result, 12, 16 ) end addCommandHandler("call", phpCall) // call.php <html> <body> <?php include( "mta_sdk.php" ); $input = mta::getInput(); mta::doReturn($input[0] + $input[1]); ?> </body> </html>
-
That's cool, nice job! will it be available at community resources?
-
Paste your /debugscript, also if possible give us a screenshot of your database.
-
What's 'Sliff'?
-
Are you using a custom nametag resource or default MTA nametags?
-
This one will come in handy!
-
You can use this code, however the co-ordinates I have placed in 'theCoordinates' table are just imaginary, you will have to replace them with your own. local theCoordinates = { [1] = { a, b, c } [2] = { d, e, f } [3] = { g, h, i } [4] = { j, k, l } } local lastCoordinate = nil function getRandomCoordinate( ) local index = tonumber( math.random( 1, 4 ) ) if ( index ~= lastCoordinate ) then lastCoordinate = index local x, y, z = unpack( theCoordinates[ index ] ) return x, y, z else getRandomCoordinate( ) end end
-
Sorry, your code is wrong too laserlaser. function seatBeltOn( player ) local check = getPedOccupiedVehicle ( player ) if ( check == true ) then local beltOn = getElementData( player, "seatbelt" ) if ( not beltOn ) then setElementData( player, "seatbelt", true) exports.global:sendLocalMeAction( player, "puts their seatbelt on.") else setElementData( player, "seatbelt", false) exports.global:sendLocalMeAction( player, "takes their seatbelt off.") end elseif ( check == false ) then outputChatBox("You are not in a car!", player, 255, 0, 0 ) end end addCommandHandler("seatbelt", seatBeltOn)
-
If you wish to permanently delete it from the database you will have to execute an SQL query to the database for the removal of the row which holds the vehicle's data. Something like this, if you're using the vG/Vedic script. local mysql = exports.sql function deleteVehicle( thePlayer, commandName, vehicleID ) if ( vehicleID ) then local vehicleID = tonumber( vehicleID ) local didFind = false for key, theVehicle in ipairs ( getElementsByType("vehicle") ) do if ( tonumber( getElementData( theVehicle, "id" ) ) == vehicleID ) then destroyElement( theVehicle ) didFind = true break end end if ( didFind ) then local delete = mysql:query_free("DELETE FROM `vehicles` WHERE `id`=".. mysql:escape_string( tostring( vehicleID ) ) .."") if ( delete ) then outputChatBox("The vehicle was successfully deleted!", thePlayer, 0, 255, 0) else outputChatBox("MySQL Error!", thePlayer, 255, 0, 0) end else outputChatBox("Couldn't find vehicle with ID ".. vehicleID, thePlayer, 255, 0, 0) end else outputChatBox("SYNTAX: /".. commandName .." [ Vehicle ID ]", thePlayer, 255, 194, 14) end end addCommandHandler("delveh", deleteVehicle, false, false )
-
Nope, like you said, trigger a server side event from client side to use the giveWeapon and takeWeapon functions.
-
Ah nice, you can also use dxDrawText instead of outputChatBox to show the vehicle name on player's screen.
-
function createCriminal( res ) criminal5 = createPed( 28, 293.54177856445, -147.95318603516,1004.0625, -90 ) setElementFrozen( criminal5, true ) end addEventHandler("onResourceStart", resourceRoot, createCriminal) function checkKills( _, thePlayer ) if ( source == criminal5 ) then givePlayerMoney( thePlayer, 1000 ) end end addEventHandler("onPedWasted", root, checkKills) There, I changed it all to server-side.
-
You cannot actually change the vehicle's name, but you can set an element data which will store the vehicle's modified name, and when someone gets in the vehicle, you can use outputChatBox to tell them the new name.
-
I'm sick of people asking for my edit of vG script every other day. -.-
-
Wow, this is good news, I've always been a fan of GTA:VC, let's hope you guys keep pushing forward with this project.
-
I don't really think any of MTA's older or coming releases had or would have any effect on the FPS, it's mostly similar to single player.
-
Looks like an interesting gamemode idea, good luck with it.
-
Lonely's code probably fixed it.
-
That made me sleepy.