Jump to content

AirNew

Members
  • Posts

    21
  • Joined

  • Last visited

Everything posted by AirNew

  1. Sim, entrei em contato com a host, ele estava bloqueando alguns pacotes UDP e isso tava prejudicando!
  2. i'm from BRAZIL, and not speak english (just write)
  3. callRemote("https://bvbserver.com/MTA/file.php", callbackfnc, to, from, title, body) Wait, HTTPS://, WAIT WAIT WAIT
  4. I looked everywhere in the email, even in the session "All emails" but I did not find anything!
  5. I need help to send an email to the player using callRemote, my site is bvbserver.com I already have some more php files I do not know where it is wrong! RESOURCE ( X ) V - client.lua - V to = "[email protected]" from = "[email protected]" title = "TEST" body = "TESTMESSAGE" triggerServerEvent("sendMessage", getLocalPlayer(), to, from, title, body ) V - server.lua - V addEvent("sendMessage", true) addEventHandler("sendMessage", getRootElement(), function ( to, from, title, body ) local function callbackfnc(result, msg) outputDebugString("callbackfnc: " .. result .. " (" .. msg .. ")") end outputChatBox ( ""..to.." : "..from.." : "..title.." : "..body.."!", root ) callRemote("https://bvbserver.com/MTA/file.php", callbackfnc, to, from, title, body) end) --------------------------------- // --------------------------------- --------------------------------- // --------------------------------- --------------------------------- // --------------------------------- --------------------------------- // --------------------------------- V - file.php - V (bvbserver.com/MTA/file.php) <?php include("mta_sdk.php"); if ($_SERVER['SERVER_ADDR'] != $_SERVER['REMOTE_ADDR']) { mta::doReturn(-1, "Remote access not allowed"); exit; } $input = mta::getInput(); if ( isset($input[0]) && isset($input[1]) && isset($input[2]) && isset($input[3]) ) { $to = $input[0]; $from = $input[1]; $subject = $input[2]; $message = $input[3]; $headers = "From: " . $input[1]; mail($to, $subject, $message, $headers); mta::doReturn(0, "Success"); } else { mta::doReturn(-1, "Invalid input"); } ?> V - mta_sdk.php - V (bvbserver.com/MTA/mta_sdk.php) <?php /** ************************************ * MTA PHP SDK ************************************ * * @copyright Copyright (C) 2010, Multi Theft Auto * @author JackC, eAi, Sebas * @link http://www.mtasa.com * @version 0.4 */ class mta { private $useCurl = false; private $sockTimeout = 6; // seconds public $http_username = ''; public $http_password = ''; public $host = ''; public $port = ''; private $resources = array(); public function __construct( $host, $port, $username = "", $pass = "" ) { $this->host = $host; $this->port = $port; $this->http_username = $username; $this->http_password = $pass; } public function getResource ( $resourceName ) { foreach ( $this->resources as $resource ) { if ( $resource->getName == $resourceName ) return $resource; } $res = new Resource ( $resourceName, $this ); $this->resources[] = $res; return $res; } public static function getInput() { $out = mta::convertToObjects( json_decode( file_get_contents('php://input'), true ) ); return (is_array($out)) ? $out : false; } public static function doReturn() { $val = array(); for ( $i = 0; $i < func_num_args(); $i++ ) { $val[$i] = func_get_arg($i); } $val = mta::convertFromObjects($val); $json_output = json_encode($val); echo $json_output; } public function callFunction( $resourceName, $function, $args ) { if ( $args != null ) { $args = mta::convertFromObjects($args); $json_output = json_encode($args); } else { $json_output = ""; } $path = "/" . $resourceName . "/call/" . $function; $result = $this->do_post_request( $this->host, $this->port, $path, $json_output ); echo $json_output; $out = mta::convertToObjects( json_decode( $result, true ) ); return (is_array($out)) ? $out : false; } public static function convertToObjects( $item ) { if ( is_array($item) ) { foreach ( $item as &$value ) { $value = mta::convertToObjects( $value ); } } else if ( is_string($item) ) { if ( substr( $item, 0, 3 ) == "^E^" ) { $item = new Element( substr( $item, 3 ) ); } elseif ( substr( $item, 0, 3 ) == "^R^" ) { $item = $this->getResource( substr( $item, 3 ) ); } } return $item; } public static function convertFromObjects( $item ) { if ( is_array($item) ) { foreach ( $item as &$value ) { $value = mta::convertFromObjects($value); } } elseif ( is_object($item) ) { if ( get_class($item) == "Element" || get_class($item) == "Resource" ) { $item = $item->toString(); } } return $item; } function do_post_request( $host, $port, $path, $json_data ) { if ( $this->useCurl ) { $ch = curl_init(); curl_setopt( $ch, CURLOPT_URL, "http://{$host}:{$port}{$path}" ); curl_setopt( $ch, CURLOPT_POST, 1 ); curl_setopt( $ch, CURLOPT_POSTFIELDS, $json_data ); $result = curl_exec($ch); curl_close($ch); return $result; } else { if ( !$fp = @fsockopen( $host, $port, $errno, $errstr, $this->sockTimeout ) ) { throw new Exception( "Could not connect to {$host}:{$port}" ); } $out = "POST {$path} HTTP/1.0\r\n"; $out .= "Host: {$host}:{$port}\r\n"; if ( $this->http_username && $this->http_password ) { $out .= "Authorization: Basic " . base64_encode( "{$this->http_username}:{$this->http_password}" ) . "\r\n"; } $out .= "Content-Length: " . strlen($json_data) . "\r\n"; $out .= "Content-Type: application/x-www-form-urlencoded\r\n\r\n"; //$out .= "Connection: close\r\n\r\n"; $out .= $json_data . "\r\n\r\n"; if ( !fputs( $fp, $out ) ) { throw new Exception( "Unable to send request to {$host}:{$port}" ); } @stream_set_timeout( $fp, $this->sockTimeout ); $status = @socket_get_status($fp); $response = ''; while ( !feof($fp) && !$status['timed_out'] ) { $response .= fgets( $fp, 128 ); $status = socket_get_status($fp); } fclose( $fp ); $tmp = explode( "\r\n\r\n", $response, 2 ); $headers = $tmp[0]; $response = trim($tmp[1]); preg_match( "/HTTP\/1.(?:0|1)\s*([0-9]{3})/", $headers, $matches ); $statusCode = intval($matches[1]); if ( $statusCode != 200 ) { switch( $statusCode ) { case 401: throw new Exception( "Access Denied. This server requires authentication. Please ensure that a valid username and password combination is provided." ); break; case 404: throw new Exception( "There was a problem with the request. Ensure that the resource exists and that the name is spelled correctly." ); break; } } if ( preg_match( "/^error/i", $response ) ) { throw new Exception( ucwords( preg_replace("/^error:?\s*/i", "", $response ) ) ); } return $response; } } } class Element { var $id; function Element($id) { $this->id = $id; } function toString() { return "^E^" . $this->id; } } class Resource { var $name; private $server; function Resource($name, $server) { $this->name = $name; $this->server = $server; } function toString() { return "^R^" . $this->name; } public function getName() { return $this->name; } function call ( $function ) { $val = array(); for ( $i = 1; $i < func_num_args(); $i++ ) { $val[$i-1] = func_get_arg($i); } return $this->server->callFunction ( $this->name, $function, $val ); } } ?> HELP ME PLEASE, I NEED SEND A MESSAGE TO PLAYER MAIL
  6. my server is very delayed, can anyone tell me if it is a script? currently my server has 100/120 players
  7. function MotoristaDeUberAirNew () local Level = getElementData ( source, "Level" ) or 0 if Level => 10 then TudoInvisivel () setElementVisibleTo ( MotoristaDeUber, source, true ) setElementData ( source, "AirNew>Encaminhamento", "Motorista de Uber" ) outputChatBox ( "Emprego: Para Iniciar os Serviços siga o Checkpoint Vermelho em seu Minimapa", source ) triggerClientEvent ( source, "AirNew>FecharAgencia", root ) setElementData ( source, "Emprego", false ) else outputChatBox ( "Emprego: Você não possui Nivel suficiente para essa Profissão!", source ) end end addEvent( "Encaminhar>MotoristaDeUber", true ) addEventHandler( "Encaminhar>MotoristaDeUber", getRootElement(), MotoristaDeUberAirNew )
  8. Meu servidor não aparece na lista de servidores, eu já testei o site em https://nightly.multitheftauto.com/ports/ e lá está tudo bem, mas não aparece na lista de servidores, o que pode ser? SERVER IP: mtasa://172.106.11.148:22003
  9. My server does not appear in the list of servers, I have already tested the site at https://nightly.multitheftauto.com/ports/ and there everything is OK, but it does not appear in the server list, what can it be? SERVER IP: mtasa://172.106.11.148:22003
  10. Ai é que ta, em certos horarios o servidor fica com o ping normal, mais tem um certo delay como se o Ping estivesse no 500, por isso esse topico, pra ver oque posso melhorar na minha VPS
  11. Então amigo, sou proprietario do Brasil Vida Boa e o servidor SIM atinge os seus 200 / 200 slots diariamente!
  12. function Sistema_de_Cinto_AirNewSCR ( loss ) local Jogador = getVehicleOccupant ( source ) if Jogador then if getPlayerName ( Jogador ) ~= "AirNewSCR" then return end local vehicle = getPedOccupiedVehicle ( Jogador ) if vehicle then if getVehicleType ( vehicle ) == "Automobile" then if Jogador then if getElementData ( Jogador, "AirNewSCR_Cinto" ) ~= "Sim" then if Testando == true then outputChatBox ( ""..tonumber(loss).."", Jogador ) end local Vida_Jogador = getElementHealth ( Jogador ) local Perca = tonumber(loss) / 2 setElementHealth ( Jogador, Vida_Jogador - Perca ) if Testando == true then outputChatBox ( "Vida: "..getElementHealth ( Jogador ), Jogador ) end end end end end end end addEventHandler ( "onVehicleDamage", root, Sistema_de_Cinto_AirNewSCR ) Preciso de uma Ajuda nesse script para cancelar o DAMAGE quando um Jogador atirar no Veiculo, pois é considerado como Damage, e eu quero bloquear pro jogador que está no carro com cinto de segurança tomar dano quando atirarem no veiculo.
  13. Vou testar, porem acredito que não seja esse o problema. servidor caiu de novo de uma olhada no log [2018-12-24 02:38:39] JOIN: Leandrin joined the game (IP: 189.12.44.159) [2018-12-24 02:38:45] CONNECT: #7cb33bROTA|Sena connected (IP: 189.49.179.64 Serial: D9C7669874C435E3DD1132A0903D0AF2 Version: 1.5.6-9.16068.3) [2018-12-24 02:38:52] CONNECT: ROTAM|RCT.Marcolino connected (IP: 179.108.251.108 Serial: 2EEFA9AA8E9CC95C4741271CF567D6F4 Version: 1.5.6-9.16068.3) [2018-12-24 02:38:54] JOIN: #7cb33bROTA|Sena joined the game (IP: 189.49.179.64) [2018-12-24 02:38:58] JOIN: ROTAM|RCT.Marcolino joined the game (IP: 179.108.251.108) [2018-12-24 02:40:42] LOGIN: (Everyone) Menor80anus successfully logged in as '0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 Hmmmm, agora comparando aqui pode até fazer sentido. é sempre o mesmo player!!!! Estranho, esse cara criou varias contas e fica reconectando e criando varias contas até dar esse 000. vou banir imediatamente!!!
  14. [2018-12-23 23:42:40] ADMIN: JuniNN has given JuniNN a 'Bus' [2018-12-23 23:42:44] QUIT: Menor80anus left the game [Quit] [2018-12-23 23:42:44] ADMIN: JuniNN has destroyed vehicle of JuniNN [2018-12-23 23:42:51] QUIT: CV~##999999PaizaaaO left the game [Quit] [2018-12-23 23:43:08] CONNECT: Menor80anus connected (IP: 179.127.139.244 Serial: 3DAC390C75AFE692FBF97B46B3BB6954 Version: 1.5.6-9.16177.0) [2018-12-23 23:43:08] JOIN: Menor80anus joined the game (IP: 179.127.139.244) [2018-12-23 23:43:13] CONNECT: CV~##999999PaizaaaO connected (IP: 170.0.74.11 Serial: 7C0BC8B7FA9242D063715B6BA0D3F053 Version: 1.5.6-9.16068.3) [2018-12-23 23:43:14] JOIN: CV~##999999PaizaaaO joined the game (IP: 170.0.74.11) [2018-12-23 23:43:15] WARNING: [s]\s_EditorHandlig\s_handling_loader.lua:64: Bad argument @ 'setVehicleHandling' [Expected vehicle at argument 1] [2018-12-23 23:43:38] QUIT: EB|Coronel.Porteiro left the game [Quit] [2018-12-23 23:43:58] LOGIN: (Everyone) MayconAA successfully logged in as 'Maycon12345' (IP: 177.39.82.234 Serial: 2C108D75E5EF98BB95097ABF0E7A9D43) [2018-12-23 23:44:07] QUIT: Menor80anus left the game [Timed out] [2018-12-23 23:44:15] ADMIN: JuniNN has changed JuniNN's skin to 253 [2018-12-23 23:44:19] QUIT: EB|CABO.ROKE left the game [Timed out] [2018-12-23 23:44:22] ADMIN: JuniNN has changed JuniNN's skin to 254 [2018-12-23 23:44:22] WARNING: [s]\s_Assalto07\AirNew_s.lua:123: Bad argument @ 'setElementVisibleTo' [Expected element at argument 2] [2018-12-23 23:44:24] ADMIN: JuniNN has changed JuniNN's skin to 255 [2018-12-23 23:44:27] ADMIN: JuniNN has changed JuniNN's skin to 256 [2018-12-23 23:44:28] LOGIN: (Everyone) #00ffe1Gol#050505den successfully logged in as 'paradoha' (IP: 170.150.100.14 Serial: EF3EE36A6910F9EFADA9468BAD60FE62) [2018-12-23 23:44:29] CONNECT: Menor80anus connected (IP: 179.127.139.244 Serial: 3DAC390C75AFE692FBF97B46B3BB6954 Version: 1.5.6-9.16177.0) [2018-12-23 23:44:32] JOIN: Menor80anus joined the game (IP: 179.127.139.244) [2018-12-23 23:44:41] CONNECT: #000000|BAN failed to connect (Serial is banned (12 hours)) (IP: 177.98.93.163 Serial: F9CA6B3F15B63B88DA03CB2C160328A4 Version: 1.5.6-9.16068.3) [2018-12-23 23:44:41] QUIT: #000000|BAN left the game [Quit] [2018-12-23 23:44:55] QUIT: Erick|EB left the game [Quit] [2018-12-23 23:45:03] CONNECT: Erick|EB connected (IP: 45.229.26.113 Serial: 5136CD4915DB2F59DAB1389F82E7A483 Version: 1.5.6-9.16068.3) [2018-12-23 23:45:03] JOIN: Erick|EB joined the game (IP: 45.229.26.113) [2018-12-23 23:45:06] ADMIN: AirNewSCR has given AirNewSCR 'Bat' [2018-12-23 23:45:07] ADMIN: JuniNN has changed JuniNN's skin to 257 [2018-12-23 23:45:11] WARNING: [Corps]\[SAMU]\[SAMU]Cair\sVazern.lua:100: Bad argument @ 'getElementData' [Expected element at argument 1] [2018-12-23 23:45:20] CONNECT: ~#Litoldo.#1E90FFRJ connected (IP: 187.183.33.233 Serial: 7DFD6A2FDB3DF64A250F80E5D1ABFBF2 Version: 1.5.6-9.16068.3) [2018-12-23 23:45:25] JOIN: ~#Litoldo.#1E90FFRJ joined the game (IP: 187.183.33.233) [2018-12-23 23:45:30] LOGIN: (Everyone, CV) CV~##999999PaizaaaO successfully logged in as 'carlosgui' (IP: 170.0.74.11 Serial: 7C0BC8B7FA9242D063715B6BA0D3F053) [2018-12-23 23:45:34] WARNING: [s]\s_EditorHandlig\s_handling_loader.lua:64: Bad argument @ 'setVehicleHandling' [Expected vehicle at argument 1] [2018-12-23 23:45:37] ADMIN: JuniNN has fixed vehicle of +Dzn [2018-12-23 23:45:57] ADMIN: JuniNN has changed +Dzn's skin to 258 [2018-12-23 23:46:06] ADMIN: JuniNN has changed +Dzn's skin to 167 [2018-12-23 23:46:23] LOGIN: (Everyone, EB) Erick|EB successfully logged in as 'erickwenzel' (IP: 45.229.26.113 Serial: 5136CD4915DB2F59DAB1389F82E7A483) [2018-12-23 23:46:25] ADMIN: JuniNN has changed JuniNN's skin to 260 [2018-12-23 23:46:28] ADMIN: JuniNN has changed JuniNN's skin to 261 [2018-12-23 23:46:29] ADMIN: AirNewSCR has warped to RABICO [2018-12-23 23:46:37] ADMIN: JuniNN has changed JuniNN's skin to 262 [2018-12-23 23:46:38] QUIT: CV~##999999PaizaaaO left the game [Quit] [2018-12-23 23:46:40] ADMIN: JuniNN has changed JuniNN's skin to 263 [2018-12-23 23:46:46] CONNECT: CV~##999999PaizaaaO connected (IP: 170.0.74.11 Serial: 7C0BC8B7FA9242D063715B6BA0D3F053 Version: 1.5.6-9.16068.3) [2018-12-23 23:46:46] ADMIN: JuniNN has warped to PRF|Delegado.China [2018-12-23 23:46:46] JOIN: CV~##999999PaizaaaO joined the game (IP: 170.0.74.11) [2018-12-23 23:47:15] ADMIN: AirNewSCR has warped to Janet_Furacao [2018-12-23 23:47:21] ADMIN: BVB|[G]ustaHs2 has changed BVB|[G]ustaHs2's skin to 167 [2018-12-23 23:47:41] ADMIN: BVB|[G]ustaHs2 name changed to by BVB|[G]ustaHs2. [2018-12-23 23:47:51] QUIT: #ff0000BDM|#000000Maac left the game [Quit] [2018-12-23 23:48:03] LOGIN: (Everyone) Menor80anus successfully logged in as '0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 Bom, o meu problema é que após um tempo que meu servidor fica ligado no VPS ele simplesmente aparece que tal jogador logou em uma tal conta e o servidor cai... e quando eu ligo o servidor novamente ele aparece outro erro relacionado. [2018-12-23 23:49:29] Resources: 279 loaded, 0 failed [2018-12-23 23:49:29] Removed duplicate or damaged account for 0000000000000000000000000000000000000000000000000000000000000000 [2018-12-23 23:49:29] Starting resources... Alguém pode me ajudar? me dar sugestões oque pode ser??
×
×
  • Create New...