Jump to content

supremedialect

Members
  • Posts

    8
  • Joined

  • Last visited

1 Follower

Details

  • Gang
    urfix

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

supremedialect's Achievements

Newbie

Newbie (4/54)

2

Reputation

  1. Thanks, everyone, for the feedback! I did use Codex to help build a good portion of the site. I write code in Lua, PHP, Python, C, C++, C#, and Rust, and AI has made my life so much easier. It lets me move faster, experiment more, and bring ideas to life that would have taken me a whole lot longer to build on my own. I see AI as a powerful tool that makes what I already know how to do even more accessible.
  2. 13 years ago @Slothman created a super hero script. it was about 98% done. i have taken over and have completed this project in my server Marvel vs DC vs Anime vs Zombies. www.geekspr.com/mta I have a bunch of super hero skins, super powers, jutsus. I even created a website that has live stats and a live webmap. What do you guys think. I will eventually upload everything to GitHub.
  3. i can definitely package this for other servers to use. haven't really thought that far ahead.
  4. I am working on a project using mtaphpsdk to create an interactive map. this is what i have so far. https://geekspr.com/mta/ thoughts?
  5. /register sdk password
  6. thank you Cody
  7. Hello everyone this is my first post please take it easy on me. here goes nothing. I followed xxmadexx's tutorial https://forum.multitheftauto.com/topic/74834-introduction-to-the-php-sdk/ It works and my site show the users. but I was wondering how do I go about exporting more information such as score and other information stored on the server. This is my server.lua file function getAllPlayersForWebsite ( ) local players = {} for k, player in ipairs( getElementsByType ("player") ) do local name = getPlayerName( player ) table.insert( players, name ) end return players end my meta xml <meta> <info author="xXMADEXx" type="script" version="1.0" name="MTA PHP" /> <!-- Include our awesome script --> <script src="server.lua" /> <!-- Export our function -- Make sure to allow HTTP to access it --> <export function="doPrint" type="server" http="true" /> <export function="getAllPlayersForWebsite" type="server" http="true" /> </meta> and the php file <?php include "sdk/mta_sdk.php"; # Include the MTA PHP SDK - Give us the classes and methods that we'll need $MY_SERVER = [ "host" => "54.153.65.51", #The host/IP of your MTA server "http_port" => 22005, #The HTTP port for your MTA server (Default 22005) "http_user" => "user", #The username that we created in the previous step "http_pass" => "password" #The password for the username that we created ]; #Create a new mta object $SERVER = new mta ( $MY_SERVER['host'], $MY_SERVER['http_port'], $MY_SERVER['http_user'], $MY_SERVER['http_pass'] ); try { $RESOURCE = $SERVER->getResource ( "mta_php" ); # We need to get our resource Object $RESULT[] = $RESOURCE->call ( "getAllPlayersForWebsite" ); foreach ( $RESULT [ 0 ] [ 0 ] as $index=>$playerName ) { print_r ( $playerName ); echo "<br /><br />"; } #Catch any errors that occurred } catch ( Exception $e ){ #Output error message echo "<strong>Oops, Something went wrong!</strong><br />Error: {$e->getMessage()}<br /><br />e printout:<br />"; #Print the error table print_r ( $e ); } ?> Where should I start?
×
×
  • Create New...