-
Posts
1,058 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Saml1er
-
and if I want to get a message to appear on the marker? viewtopic.php?f=91&t=41210
-
Ah, it was not a command handler. Missed it. ^^
-
setTimer ( function(source) setPedAnimation( source, false) outputChatBox("[sERVER] Efeito das drogas passou", source) end, 2000, 1 ,source )
-
I can make this script with panel if someone wants only for 2 $. Seriously you're day dreaming. The price is 30 % of my lobby script. I'm selling it for 80 $ after working on it for a month.. I can make something like this in 20 mins.
-
Ye Urdu board hai is liye urdu bolni zaroori hai.. Meine kab kaha ke urdu bolna zaroori nahi liken meine sirf kuch letters type kiye lol. Pata nahi tum kyu itna fazool mein bens ker rahay raho. I can say anything I want. Hi hello Hey Problem??
-
but you forgot to add Function to ban Tunisia ? local countries = { [ "TN" ] = true } local serials = { [ "" ] = true } function paises ( banner) local gCountry = exports.admin:getPlayerCountry ( source ) or "N/A" local gSerial = getPlayerSerial ( source ) if ( serials [ gSerial ] ) then elseif ( countries [gCountry] ) then banPlayer(source,true,false,true,"Console","Tunisia is Banned.",0) outputChatBox("#FFFFFF"..getPlayerName(source).."#FF0000Has Been Banned by "..getPlayerName(banner)..". #FFFFFF[Reason : Tunisia Is Banned.]", root, 255,255,255,true) end end addEventHandler ( "onPlayerJoin", getRootElement(), paises ) Nope. I'm on from my mob so I can't select and copy much text since it's a pain so I just copied the function but you should add the table.
-
function paises ( banner) local gCountry = exports.admin:getPlayerCountry ( source ) or "N/A" local gSerial = getPlayerSerial ( source ) if ( serials [ gSerial ] ) then elseif ( countries [gCountry] ) then banPlayer(source,true,false,true,"Console","Tunisia is Banned.",0) outputChatBox("#FFFFFF"..getPlayerName(source).."#FF0000Has Been Banned by "..getPlayerName(banner)..". #FFFFFF[Reason : Tunisia Is Banned.]", root, 255,255,255,true) end end addEventHandler ( "onPlayerJoin", getRootElement(), paises )
-
Hehe HB @ your bro. ;D Aap Urdu nahi bol sakte kya??? Kya? Janam din mubarak ho? -.- P.S meri marzi urdu boloon ya English. Yahan per koi restriction nahi hain lol.
-
Hehe HB @ your bro. ;D
-
Omg. I nerver saw that function.
-
You're using a timer which is pretty usless since it can cause some laggs because of 3 loops every min. I'll fix you're full code but if you're happy with laggs then I've no problem. This code seems fine. If you're still having problem with it then just send me the part where you're setting element data "gang".
-
Your script will be using too much cpu since it's using root which is not needed even localPlayer will do that since the event will be heard in other all resources even if you don't have an event handler so it's better to use resourceRoot which will use less cpu. function punishPlayer(attacker) if source ~= attacker then cancelEvent() triggerServerEvent("onPlayerPunished", resourceRoot, attacker) -- just changing this end end addEventHandler("onClientPlayerDamage", root, punishPlayer) P.S phool gaya ke ye urdu section hain.. Anyway meine tumhara topic dhek liya tha liken mujhe pata nahi tha ke tum zone ke bare mein baat ker rahay thay.
-
Happy Birthday! ^▽^
-
You don't need to decrypt it. Just like cont said. First get the encrypted pass then convert the normal pass to md5 and then compare them ( if oldPass == newPass then. )
-
I think I completely misunderstood him. Your code makes complete sense since table.insert will take care of index [#myTable+1] = v. Btw whatever I wrotr was for string keys. If you're using index keys then do what ixjf said.
-
Why don't you check map editor resource? I'm sure you'll see how they did it.
-
After searching so much I ended up here. Most topics were old made in 2012 - 13. So I thought MTA might have come up with something. I found a function which loads IFL file but they disabled it. Men, I hope if they enable it in future. I'm working on a gamemode and so on I need some custom animations for that.
-
Good job. Well explained.
-
Hello! Is there any way to load custom anim files?
-
DNL's code is correct. You don't need a loop for checking string keys. I modified his code a bit. local adminList = { ["1C2F2D1B38C02ACAE922426CAFF701F3"] = 3,-- if you don't need those numbers then replace them with true ["BB324608511608C41E9D94A3D4E7F742"] = 3 } addEventHandler("onPlayerJoin",root,function() if adminList[getPlayerSerial(source)] then -- Now do your stuff here end end)
-
https://wiki.multitheftauto.com/wiki/SetVehicleColor Maverick1 = Vehicle(487, Vector3(0, 0, 0)) Maverick1:setColor(255, 0, 0, 255) Apparently you don't read. This is for MTA 1.0.5.
-
1. Yes. 2. They will get different output since math.random exists for this purpose.
-
Actually 3, RGB. Alpha is optional. Btw does it create the vehicle? EDIT: ... I just checked it has 4 arguements and there is no alpha. Go to wiki and check for setVehicleColor. Scroll down and you'll see it has 4 arguements. 3 arguements are gonna be in mta 1.5
-
You got this wrong. local __n = 5-- suppose table size is 5 but your table has 1,3,5,9,10 indexes local ran = math.random (__n) -- but this will return number between 1-5 it can also be 2 or 4 which is not your table index There's no possible way to do this other than a loop but we'll optimize the code by using a single loop rather than using 2. I found something useful on a forum. I modified his code a little. Here, Post by Robin: Also, a better way of dealing this is to keep another list with the keys: Code: local function generate_key_list(t) local keys = {} for k, v in pairs(t) do keys[#keys+1] = k end return keys end then you can do: Code: local keys = generate_key_list(myTable) local randomValue = myTable[keys[math.random(#keys)]]