Jump to content

FatalTerror

Members
  • Posts

    304
  • Joined

  • Last visited

Everything posted by FatalTerror

  1. Hi everybody, I want know how the function deleteResource() work ! I try everything... I don't understand Exemple: deleteResource ( ""..getResourceName(exports.mapmanager:getRunningGamemodeMap()).."" ) And in the debugscript have "bad argument.." Thx to help me
  2. Public release: Script for server: https://community.multitheftauto.com/index.php?p=resources&s=details&id=3112 PHP Files for website: http://www.megaupload.com/?d=IY8PKCNE Bugs detected: Every tweets go on the user account and on the owner of application (me ) @Otto: Thanks! I'll see if I can fix bugs and improve the existing system. And if all this happens without any problems, i make it on Facebook.
  3. Twitter MTA Hi everybody! I just came to make a "like" script. It means you can like a map like on facebook or twitter. I tried it with Facebook but i've got troubles with my account so i tried it with twitter. Example When you're connected to the mta server : Write /like to tell people you like the map you're currently playing on the server. On the website : You can see what maps have been "liked" by any player. On twitter : an application is activated and receives the information which will be transfered to your own account. Codes For send the informations to the website you can use callRemote() callRemote ( "http://www.watzuku.com/MTA/index.php", tweeter_feedback, name, ip, message ) 1 argument: The url of the website. 2 argument: the call back function 3, 4, 5 argument: Informations to send to website (the name of the player, ip of the player, and the message of the tweet) Now we have send informations to our website, for receives informations in the website you can use: /!\ The script use PHP SDK ! include( "mta_sdk.php" ); $input = mta::getInput(); $name = $input[0]; $ip = $input[1]; $message = $input[2]; For send the informations on Twitter you can use the TwitterOAuth. <?php function tweet($message) { require 'tmhOAuth.php'; $tmhOAuth = new tmhOAuth(array( 'consumer_key' => '', 'consumer_secret' => '', 'user_token' => '', 'user_secret' => '', )); $tmhOAuth->request('POST', $tmhOAuth->url('statuses/update'), array( 'status' => utf8_encode($message) )); if ($tmhOAuth->response['code'] == 200) {return TRUE;} else {return FALSE;} } ?> You see it's possible, i will show u more later. Demo: For a demo, you can visit the AMG server and use /like in a map. I don't want give this resource to public now. You must be logged in Twitter ! Security: this system is fully safe. Informations can't be stolen this way! Sry for bad english Thx, FatalTerror.
  4. Salut a toi, Utilise plutot un setElementData (Sauvegarde une valeur pour l'element) plutot qu'une varaible... C'est juste un conseil ^^ Apres ton code est plutot bon... et bienvenue dans le monde du LUA Edit: Y a aussi le setAccountData (Sauvegarde une valeur pour le compte) et la base de donnée MySQL(Un peut plus hard). Bonne chance
  5. Hi everybody. I want add in the column in the scoreboard with picture a place of text. Understand ? Exemple... My friends told me that it was necessary to change the scoreboard ... for me it is suicide I find this in the community but don't help me *inlove* https://wiki.multitheftauto.com/wiki/Scoreboard Thx for help me Bye, FatalTerror
  6. Hum.. Si voce pagou para o server (serverffs, delux-host...) o teu server e automaticamente colocado no game-monitor.. Si e um server LAN voce tem que abrir os ports e esperar Boa sorte Awesome Mapping & Gaming
  7. Voce deu admin au script ? O script tem que ser no group ACL "Admin" para poder funcionar Bye
  8. Lol ... Eu acho que eh impossivel de colocar un trem em un trilho que foi feito voce mesmo. Tchauz..
  9. Eh melhor de fazer un codigo mais limpo addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function() txd = engineLoadTXD ( "texture.txd" ) engineImportTXD ( txd, 500 ) -- O id do seu objeto end) Asim e melhor ...
  10. Très bien tout sa mais c'est du LUA brut lol. Fait nous un cours sur le LUA MTA.
  11. Euh non Y a 2 version de toptimes. Celle qui est fourni par Multi Theft Auto est uniquement pour les maps avec des checkpoint. Y a celle fourni par Asia(je crois ). Tu peux la download ici: https://community.multitheftauto.com/index.php?p=resources&s=details&id=1345 Voila, A+
  12. Ups sorry, i find this code in other forum ...
  13. SERVER: Code: (lua) franceGol = createMarker ( 0, 0, 2.2164173126221, "cylinder", "7", 0, 255, 0, 255, getRootElement() ) espagneGol = createMarker ( 50, 50, 2.2164173126221, "cylinder", "7", 0, 255, 0, 255, getRootElement() ) balle = createObject ( 1305, 0, -10, 2.9733681678772) setElementID( franceGol, "franceGol" ) setElementID( espagneGol, "espagneGol" ) setElementID( balle, "balle" ) -- But addEvent( "onPlayerGoal", true ) function onPlayerGoal( equipe ) ----------------- NE PAS TOUCHER ------------------------ triggerClientEvent( "setGOAL", getRootElement() ) ------- --------------------------------------------------------- outputChatBox( equipe..": GOOOOOOOOOOOOOOOOL", getRootElement(), 255, 255, 0 ) setTimer( playAgain, 4000, 1 ) end addEventHandler( "onPlayerGoal", getRootElement(), onPlayerGoal ) function playAgain() ----------------- NE PAS TOUCHER ------------------------ triggerClientEvent( "resetGOAL", getRootElement() ) ----- --------------------------------------------------------- -- ceci est un exemple, à toi de le modifier comme bon te semble setElementPosition( balle, 0, -10, 2.9733681678772 ) end CLIENT:( à ne pas toucher ) Code: (lua) GOAL = 0 -- GOAL évite le flood function markerHIT() local equipe local balle = getElementByID( "balle" ) local marker = getElementByID( "franceGol" ) local marker2 = getElementByID( "espagneGol" ) local bool = isElementWithinMarker( balle, marker ) local bool2 = isElementWithinMarker( balle, marker2 ) if bool then equipe = "france" elseif bool2 then equipe = "espagne" end if ( (bool or bool2) and GOAL == 0)then GOAL = 1 triggerServerEvent( "onPlayerGoal", getLocalPlayer(), equipe ) end end setTimer( markerHIT, 500, 0 ) addEvent("resetGOAL", true ) function resetGOAL() GOAL = 0 end addEventHandler("resetGOAL", getRootElement(), resetGOAL ) addEvent("setGOAL", true ) function setGOAL() GOAL = 1 end addeventHandler("setGOAL", getRootElement(), setGOAL )
×
×
  • Create New...