-
Posts
1,903 -
Joined
-
Last visited
-
Days Won
1
Everything posted by xeon17
-
Ask the owner of this script to help you, by the way from where you have this script?
-
The error is because the event inviteToBuyCarSended is missing on server side
-
Ipak nakon kratkog razgovora odlučili smo da da projekt bude internacionalni zbog toga što nismo uspjeli da nadjemo više ljudi za ekipu. Meni je stvarno žao zbog toga ali ne vidim neko drugo riješenje, nadam se da će u budućnosti biti nešta od Balkanske Zajednice u MTA ali za sad nema uslova za to. Više o informacija o tome i našim novim planovima ima ovde: viewtopic.php?f=177&t=89097
-
-- Client Side addEventHandler('onClientResourceStart',resourceRoot, function () local screenW,screenH = guiGetScreenSize() if screenW <= 800 and screenH <= 600 then triggerServerEvent('kickPlayer',localPlayer,'Por favor utilize uma resolução acima de 800x600') end end) -- Server Side addEvent('kickPlayer',true) addEventHandler('kickPlayer',root, function (reason) kickPlayer(client,_,tostring(reason) end) Você está usando funções do lado do servidor e funções do lado do cliente em conjunto e que nunca vai funcionar. Use o código que eu fiz para você, e não se esqueça de adicionar o recurso no acl.
-
Use it together in the event onPlayerWasted and it should work without problems
-
addEventHandler('onClientPlayerDamage',root, function () cancelEvent() end)
-
[ FECHADO ] Duvida
xeon17 replied to Stronger's topic in Ajudas relacionadas ao MTA:SA (Cliente/Servidor)
Eu não sugiro que você use CEF no MTA 1.4 com a API, está desatualizada e não estável. Você pode encontrar as últimas notícias e tutorial sobre CEF no tópico seguinte: https://wiki.multitheftauto.com/wiki/CEF_Tutorial -
[ RESOLVIDO ]Sobre MB do Servidor
xeon17 replied to Stronger's topic in Ajudas relacionadas ao MTA:SA (Cliente/Servidor)
Eu não concordo com vocês ambos, você pode deixar todos os seus carros sem problemas e com muito melhor desempenho com a solução que Banex postou. Parece que vocês ambos são demasiado estúpidos para entender isso. Mas realmente não é problema meu se você quer que os seus jogadores têm que esperar o download de alguns 500-800 MB para jogar em vez de 300 ou ainda mais baixo -
[HELP]I start to make an inventory system on my own :D
xeon17 replied to 2013martin1212's topic in Scripting
Sorry, but i can't understand anything , please speak english -
[ RESOLVIDO ]Sobre MB do Servidor
xeon17 replied to Stronger's topic in Ajudas relacionadas ao MTA:SA (Cliente/Servidor)
Eu gostaria de sugerir para combinar a minha solução com solução do Banex o que daria um resultado realmente impressionante. -
[ RESOLVIDO ]Sobre MB do Servidor
xeon17 replied to Stronger's topic in Ajudas relacionadas ao MTA:SA (Cliente/Servidor)
Os melhores servidores MTA têm o seu próprio downloader personalizado que permite aos jogadores baixar os mods no fundo, então depois que baixou o cache eles podem jogar sem problemas. Aqui estão algumas downloaders personalizados de comunidade: https://community.multitheftauto.com/in ... s&id=10814 https://community.multitheftauto.com/index.php?p= ... s&id=11265 -
You can solve the problem with spamming by using the following resource, which will kick everyone who post a server ip into the chat. Don't forget to add the resource in ACL , the function kickPlayer request acces to it. https://community.multitheftauto.com/in ... ls&id=9846
-
Use this function: dxDrawImage
-
Hello there, I've installed a MTA Server x64 server recently and MySQL doesn't work. I saw on forum that x64 servers request a other version of libmysqlclient so i tried to install but i got problems which i can't solve alone. Everytime when i try to replace the old libmysqlclient with the other one it says i don't have the permission to do this. Error in Filezila: Pogreška: /usr/lib/libmysqlclient.so.16: open for write: permission denied Pogreška: File transfer failed Error in PuTTy : $ chmod 777 libmysqlclient.so.16 chmod: changing permissions of `libmysqlclient.so.16': Operation not permitted $ wget [url=https://nightly.multitheftauto.com/files/x64/libmysqlclient.so.16]https://nightly.multitheftauto.com/files/x64/libmysqlclient.so.16[/url] --2015-06-17 22:24:40-- https://nightly.multitheftauto.com/files/x64/libmysqlclient.so.16 Resolving nightly.multitheftauto.com (nightly.multitheftauto.com)... 2a01:4f8:a1:221::11, 91.121.44.90 Connecting to nightly.multitheftauto.com (nightly.multitheftauto.com)|2a01:4f8:a1:221::11|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 2209664 (2.1M) [application/octet-stream] libmysqlclient.so.16.1: Permission denied
-
I've already made my own Login Panel , and yes i insert the player data into the database on registration so there is no problem. Using onResourceStart was a mistake which i've fixed already , i wanted to use onResourceStop but i wrote it wrong for some reason. I'm already working on a new and better looking code of the save system but i have some problems if i don't solve them i'll post again here. Thanks Lawliet
-
What a stupid mistake, i didn't tested that... Thanks.
-
I'm not trying to update , and as i know i need to use query to get the result, but it could be wrong as i'm begginer at sqlite.I'm trying to load it and spawn the player with these data. I can post some more information
-
Sorry, but i don't understand you?
-
Anubhav Thanks for your help , it worked awesome. Also i would like to know why after i removed the comma it worked so i can prevent similiar problems in the future. It saves the data without problem when the resource stop and when the player quit but i got another problem , it doesn't load the data and it doesn't spawn the player when he login. I made a function for easier debugging accountExist and yes it output the name of my Username&Account in debug but the rest doesn't work for any reason. Here is the part of my code where i load the data and spawn the player. function loadPlayerData() if (not isGuestAccount(getPlayerAccount (source))) then local account = source.account:getName() local data = doesAccountExists (account) outputDebugString('Core: Checking does the account exists') -- it output this if (data and type (data) == 'table' ) then outputDebugString('Core: Checking: true') -- it doesn't output this for i, v in ipairs (data) do if (v['Username'] == account) then outputDebugString('Core: Loading Data') -- it doesn't output this local money = tonumber ( v['Money']) or 0 local armor = tonumber (v['Armour']) or 0 local health = tonumber (v['Health']) or 0 local x = tonumber (v['PlayerPositionX']) or 0 local y = tonumber (v['PlayerPositionY']) or 0 local z = tonumber (v['PlayerPositionZ']) or 3 local rotation = tonumber (v['Rotation']) or 90.0 local skin = tonumber (v['Skin']) or 0 local interior = tonumber (v['Interior']) or 0 local dimension = tonumber (v['Dimension']) or 0 local team = tostring (v['Team']) or "Nezaposleni" local weapons = fromJSON (v['Weapons']) local weapstats = fromJSON (tostring(v['Stats'])) source:spawn(x,y,z,rotation,skin,interior,dimension) source:setMoney(money) source:setArmor(armor) source:setHealth(health) outputDebugString('Core: Data successfully loaded') -- it doesn't output this end end end end end addEventHandler('onPlayerLogin',root,loadPlayerData) -- Utills function accountExist(acc) outputDebugString(acc .. "exists!") end function doesAccountExists ( acc ) if ( acc ) then local check = function(result, acc) if(#result > 0 ) then accountExist(acc) end end Database.getInstance():query(check, {acc},"SELECT * FROM Accounts WHERE Username='"..acc.."' LIMIT 1") end return nil end
-
Yeah i thinked the same , but i guess the event trigger when a client-side custom weapon fire.
-
Does someone know what's wrong? I still need help.
-
Read the description this event is only triggered when a custom weapon gets fired.
-
Read the description this event is only triggered when a custom weapon gets fired.
-
givePedWeapon is a client-side function which also works only on peds and not on players. Use this instead, it should work. function weapon() local theDude = isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) giveWeapon ( theDude, 36, 5000, true) end addEventHandler("onPlayerSpawn",getRootElement(),weapon)