
toxicsmoke11
Members-
Posts
232 -
Joined
-
Last visited
Everything posted by toxicsmoke11
-
onClientMouseEnter and onClientMouseLeave use this events
-
you need a shader
-
setWeaponProperty("minigun", "pro", "flag_type_dual", true) i made such a stupid question,this was easy. would be nice if a moderator could either lock or deelete this topic
-
would it be possible to make a player able to have dual miniguns?and jump with miniguns? with setWeaponProperty or i gotta use something else,or it isnt possible at all?
-
https://wiki.multitheftauto.com/wiki/SetWeaponProperty
-
hello. i havent done any changes to runcode resource,just added it to start automatically when my gamemode starts and now when i try to connect it says (disconnects me from game with that error box)
-
Symbols and Value / String Meanings ?
toxicsmoke11 replied to Grim_The_X_Reaperr's topic in Scripting
http://www.lua.org/manual/5.1/manual.html -
You don't need to create a server,it's already there in your MTA directory just open the .exe program and then if u want to connect to it click server browser in mta and click tab 'Local' and connect to your server
-
hello! i wanted to ask how could i do something like this: a player writes f*ck you and it cancels event(i will script that by myself) but how could i output to all admins that the player tried writing that message? i saw somewhere that it could be with exports but i dont understand it
-
just wanted to ask something about addEventHandler
toxicsmoke11 replied to toxicsmoke11's topic in Scripting
okay thanks for explaining Saml1er and KRZO -
i just want to ask is there any difference between this: addEventHandler("onPlayerJoin",root --other part of code end) -- ) closing the up addEventHandler and addEventHandler("onPlayerJoin",root,functionName) only thing i've noticed is that up example is used when theres no function name,but i am curious is there any difference other than that?
-
Why would i let everybody to use this command?it can be used for trolling other people. i just want to make it like what u first said, only people with "function.banPlayer" can use pban command,if they dont have that function it kicks them out with that message "dont abuse admin system". but i've tried switching theTarget with thePlayer in few lines and it works anyway, thank you Solidsnake for helping me with this script
-
tried your code,and it kicks me no matter if im admin or not edit:just noticed,in your code you changed thePlayer with theTarget(2nd line),so it messes it up totally i guess. thePlayer is suppost to be a person who uses command theTarget is like this /pban *name* *name* is theTarget
-
I Don't understand the meaning of word 'define' so i don't know what to answer,i was just looking at some other script examples and looked into function thing and there was theTarget,and the only place where it was mentioned was in function *name*(*here*) and it worked fine,so i guess that i forgot to define it or something because it's clearly not working. Sorry for my english and my bad lua skills and my not clear understanding of word 'define'
-
So,i've started doing one system,something like a ban system but not exactly "ban" system,more like keep-away system anyway, i am getting 2 errors,and i do not understand what have i done wrongly. here's my code function dimensionSystem(commandName,thePlayer,theTarget) if hasObjectPermissionTo(theTarget, "function.banPlayer",true) then showPlayerHudComponent ( theTarget, "ammo", false ) showPlayerHudComponent ( theTarget, "area_name", false ) showPlayerHudComponent ( theTarget, "armour", false ) showPlayerHudComponent ( theTarget, "breath", false ) showPlayerHudComponent ( theTarget, "clock", false ) showPlayerHudComponent ( theTarget, "health", false ) showPlayerHudComponent ( theTarget, "money", false ) showPlayerHudComponent ( theTarget, "vehicle_name", false ) showPlayerHudComponent ( theTarget, "weapon", false ) showPlayerHudComponent ( theTarget, "radar", false ) showChat( theTarget, false ) else kickPlayer(thePlayer,"Don't abuse the Admin system!") end end addCommandHandler("pban",dimensionSystem) i get these two errors: I've readed both hasObjectPermissionTo and kickPlayer function pages,and i don't see what am i doing wrong as my syntax is correct as far as i see. Please help me. I'm new to this.
-
Thanks ali digitali
-
getLocalPlayer is only client side,and its not working on client side at all
-
actually i tried that at start but it didnt work at all lol. now my code is like this function getPlayerFromNamePart(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end function trollRandomPlayerWithFire(commandName,thePlayer,theTarget) local target = getPlayerFromNamePart ( theTarget ) local troller = getPlayerName(root,thePlayer) if ( theTarget ) then setPedOnFire(target,true) outputChatBox("You've been set on fire by" .. troller .. "",root,255,0,0,true) outputDebugString( target .. "has been set on fire by" .. troller .. "" ) end end addCommandHandler("fire",trollRandomPlayerWithFire) it makes the fire but this is still an error also it doesnt output on chatbox that i've been set on fire by *name*
-
hello i wanted to make a script with which i could set a player on fire by doing /fire partofplayername however it doesnt work function getPlayerFromNamePart(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end function trollRandomPlayerWithFire(commandName,thePlayer,theTarget) local target = getPlayerFromNamePart ( theTarget ) local troller = getPlayerName(thePlayer) if ( theTarget ) then setPedOnFire(theTarget,true) outputChatBox("You've been set on fire by" .. troller .. "",255,0,0) outputDebugString( .. target .. "has been set on fire by" .. troller .. "" ) end end addCommandHandler("fire",trollRandomPlayerWithFire) this is error i've tried commenting out the line with outputDebugString just to see would this thing even work,but this script didnt work at all,and didnt give any error. edit: wrote a wrong line in () at function line but gives this error please help
-
what does inb4 means? I dont know >.< http://www.urbandictionary.com/define.php?term=inb4