
joedajoester
Members-
Posts
256 -
Joined
-
Last visited
Everything posted by joedajoester
-
Thsis a differenct script. eof expected near end. Do you want me to post all the scripts that need t o be changed? Or can you tell me what to change?? col = createColTube (-1683.0999755859, -2881.1000976563, 50.400001525879, 10, 3) -- enter your cooderates here for your colshape please note 10 and 3 is to do with the size of the shape. root = getRootElement () cone1 = createObject ( 1237, -1679.099609375, -2884.099609375, 51.099998474121, 0, 0, 311.99523925781) -- enter the ID of the object followed by the coordinates cone2 = createObject ( 1237, -1681.5, -2881.7998046875, 51.099998474121, 0, 0, 311.99523925781) cone3 = createObject ( 1237, -1684.19921875, -2879.3994140625, 51.099998474121, 0, 0, 311.99523925781) cone4 = createObject ( 1237, -1686.7998046875, -2877, 51.099998474121, 0, 0, 311.99523925781) gate1 = createObject ( 980, -1683, -2881.19921875, 54, 0, 0, 317.99926757813) -- note the rotx y and z may not be required so you just remove these. x y and z is where you would put your cordinates. function Open ( pla ) if getElementType ( pla ) == "player" then if isStaff(player) then moveObject (cone1, 300, -1679.0999755859, -2884.1000976563, 50) moveObject (cone2, 300, -1681.5, -2881.8000488281, 50) moveObject (cone3, 300, -1684.1999511719, -2879.3999023438, 50) moveObject (cone4, 300, -1686.8000488281, -2877, 50) moveObject (gate1, 2500, -1674.4000244141, -2888.8999023438, 54) -- here is where you enter the coordinatess of the new location of the object, 2200 = the speed of the movent. end end end addEventHandler ( "onColShapeHit", col, Open) function Close ( pla ) if getElementType ( pla ) == "player" then if isStaff(player) then moveObject (cone1, 300, -1679.099609375, -2884.099609375, 51.099998474121) moveObject (cone2, 300, -1681.5, -2881.7998046875, 51.099998474121) moveObject (cone3, 300, -1684.19921875, -2879.3994140625, 51.099998474121) moveObject (cone4, 300, -1686.7998046875, -2877, 51.099998474121) moveObject (gate1, 2500, -1683, -2881.19921875, 54) -- here is where you copy the coordinates of the orginal location of the object, 2951 = the timer of movent. end end end addEventHandler ( "onColShapeLeave", col, Close ) function isStaff(pla) for index, group in ipairs({"Admin", "SuperModerator", "Moderator"}) do if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(player)), aclGetGroup ( group ) ) then return true end break end return false end
-
No i need it so it opens to moderators smods and admins
-
Whats wrong with this? function connect() outputChatBox("Hello, i am your assistant. You can ask me questions and i will perform tasks. You can even ask for a car, or weapon. You can also talk to me! Go ahead, have fun!", getRootElement(), 0, 255, 0) end addEventHandler("onPlayerConnect", getRootElement(), connect)
-
Why do these scripts only work for admins, i need it to be staff only please. function getPlayerFromPartOfName(playerPart) local pl = getPlayerFromName(playerPart) if isElement(pl) then return pl else for i,v in ipairs (getElementsByType ("player")) do if (string.find(getPlayerName(v),playerPart)) then return v end end end end function Jail (player, command, name) if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(player)), aclGetGroup ( Admin" ) ) then local thePlayer = getPlayerFromPartOfName(name) if not thePlayer then return end if getElementData( thePlayer, "isJailed") then outputChatBox("This player is already in jail.",player,255,0,0) return end setElementData(thePlayer, "jailSkin", getElementModel ( thePlayer )) setElementModel ( thePlayer, 22 ) setElementPosition ( thePlayer, 52, 2483, 21 ) takeAllWeapons ( getRootElement() ) setElementData ( thePlayer, "isJailed", true ) outputChatBox (getPlayerName(thePlayer).." has been jailed", getRootElement(), 255, 0, 0, true ) else outputChatBox ("You cannot use this command!", player, 255, 0, 0, true ) end end addCommandHandler("jail",Jail) function Unjail (player, command, name) if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(player)), aclGetGroup ( "Admin" ) ) then local thePlayer = getPlayerFromPartOfName(name) if not thePlayer then return end if not getElementData( thePlayer, "isJailed") then outputChatBox("This player is not in jail.",player,255,0,0) return end setElementPosition ( thePlayer, 72, 2484, 16.3 ) setElementModel ( thePlayer, tonumber(getElementData(thePlayer,"jailSkin"))) setElementData ( thePlayer, "isJailed", false ) outputChatBox (getPlayerName(thePlayer).." has been unjailed. Be good now, "..getPlayerName(thePlayer), getRootElement(), 0, 255, 0, true ) else outputChatBox ("You cannot unjail yourself!", player, 255, 0, 0, true ) end end addCommandHandler("unjail",Unjail) ped1inside = createPed ( 71, 69, 2503, 17) setPedRotation (ped1inside, 180) function respawn() local x,y,z = getElementPosition(source) local rx,ry,rz = getElementRotation(source) setTimer(createPed, 60000, 1, 71, x,y,z,rz) if isElement(ped1inside) then destroyElement(ped1inside) end end addEventHandler("onPedWasted",ped1inside,respawn) function visit (player) setElementPosition (player, 71, 2499, 17 ) end addCommandHandler("visitjail", visit) What do i have to replace if is inadmingroup with? ill do it myself, becasue i have many scripts that need to be changed
-
It still doesnt work and i get no error. Everything works fine, just the car spawning part.
-
ok i will test this tomorrow. thank you and what was going wrong?
-
Still doesn't work and no error code. The sv script is also running along with thi script. Do you know what's going wrong??
-
For this i get error, bad argument @ excuteCommandHandler expected argument at element 2. function sendMessage2( messageclean, messageType) if (string.find(messageclean, "i") and string.find(messageclean, "love") and string.find(messageclean, "bot")) then outputChatBox("i love you too!", source, 191, 62, 255) end end addEventHandler("onPlayerChat",root,sendMessage2) function sendMessage2( messageclean, messageType) if (string.find(messageclean, "i") and string.find(messageclean, "hate") and string.find(messageclean, "bot")) then outputChatBox("Ill note that", source, 191, 62, 255) end end addEventHandler("onPlayerChat",root,sendMessage2) function sendMessage2( messageclean, messageType) if (string.find(messageclean, "hi") and string.find(messageclean, "bot")) then outputChatBox("Hello", source, 191, 62, 255) end end addEventHandler("onPlayerChat",root,sendMessage2) function sendMessage2( messageclean, messageType) if (string.find(messageclean, "how") and string.find(messageclean, "are") and string.find(messageclean, "bot")) then outputChatBox("I'm doing great", source, 191, 62, 255) end end addEventHandler("onPlayerChat",root,sendMessage2) function sendMessage2( messageclean, messageType) if (string.find(messageclean, "i") and string.find(messageclean, "a") and string.find(messageclean, "infernus")) then executeCommandHandler ( "sv infernus", playerSource ) end end addEventHandler("onPlayerChat",root,sendMessage2)
-
function sendMessage2( messageclean, messageType, commandName, ... ) if (string.find(messageclean, "i") and string.find(messageclean, "a") and string.find(messageclean, "infernus")) then local x, y, z = getElementPosition ( sourcePlayer ) -- get the player's position local rotZ = getPedRotation ( sourcePlayer ) -- get the player's rotation around the Z axis in degrees x = x + ( ( math.cos ( math.rad ( rotZ ) ) ) * distance ) -- calculate the X position of the vehicle y = y + ( ( math.sin ( math.rad ( rotZ ) ) ) * distance ) -- calculate the Y position of the vehicle local vehicleName = table.concat({...}, " ") local vehicleID = getVehicleModelFromName ( vehicleName ) if vehicleID then local newVehicle = createVehicle ( vehicleID, x, y, z, 0, 0, rotZ ) if not newVehicle then outputConsole ( "Failed to create vehicle.", sourcePlayer ) end end end end addEventHandler("onPlayerChat",root,sendMessage2)
-
Is there a function in scripting that can perform a command from another script? Like in one script, if someone types, can i get a infernus. I got the scripting part to get what someone says. Then the script would output a code like /cv infernus for that player. Would aexec work in a script?
-
Doesnt work, i get no error, and dont you need a command handler?? function sendMessage2( messageclean, messageType) if string.find(messageclean, "i") and string.find(messageclean, "love") and string.find(messageclean, "bot") then outputChatBox("i love you too!", source, 191, 62, 255) end end
-
function sendMessage2( messageclean, messageType) if string.find(message, "i") and string.find(message, "love") and string.find(message, "bot") then outputChatBox("i love you too!", source, 191, 62, 255) end end
-
whats wrong with this? if string.find(message, "i") and string.find(message, "love") and string.find(message, "bot") then outputChatBox("i love you too!", source, 191, 62, 255) end
-
never mind i got it myself.. function getPlayerFromPartOfName(playerPart) local pl = getPlayerFromName(playerPart) if isElement(pl) then return pl else for i,v in ipairs (getElementsByType ("player")) do if (string.find(getPlayerName(v),playerPart)) then return v end end end end function Jail (player, command, name) if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(player)), aclGetGroup ( "Admin" ) ) then local thePlayer = getPlayerFromPartOfName(name) if not thePlayer then return end if getElementData( thePlayer, "isJailed") then outputChatBox("This player is already in jail.",player,255,0,0) return end setElementData(thePlayer, "jailSkin", getElementModel ( thePlayer )) setElementModel ( thePlayer, 22 ) setElementPosition ( thePlayer, 52, 2483, 21 ) takeAllWeapons ( getRootElement() ) setElementData ( thePlayer, "isJailed", true ) outputChatBox (getPlayerName(thePlayer).." has been jailed", getRootElement(), 255, 0, 0, true ) else outputChatBox ("You cannot use this command!", player, 255, 0, 0, true ) end end addCommandHandler("jail",Jail) function Unjail (player, command, name) if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(player)), aclGetGroup ( "Admin" ) ) then local thePlayer = getPlayerFromPartOfName(name) if not thePlayer then return end if not getElementData( thePlayer, "isJailed") then outputChatBox("This player is not in jail.",player,255,0,0) return end setElementPosition ( thePlayer, 72, 2484, 16.3 ) setElementModel ( thePlayer, tonumber(getElementData(thePlayer,"jailSkin"))) setElementData ( thePlayer, "isJailed", false ) outputChatBox (getPlayerName(thePlayer).." has been unjailed. Be good now, "..getPlayerName (thePlayer), getRootElement(), 0, 255, 0, true ) else outputChatBox ("You cannot unjail yourself!", player, 255, 0, 0, true ) end end addCommandHandler("unjail",Unjail) ped1inside = createPed ( 71, 69, 2503, 17) setPedRotation (ped1inside, 180) function respawn() local x,y,z = getElementPosition(source) local rx,ry,rz = getElementRotation(source) setTimer(createPed, 60000, 1, 71, x,y,z,rz) if isElement(ped1inside) then destroyElement(ped1inside) end end addEventHandler("onPedWasted",ped1inside,respawn) function visit (player) setElementPosition (player, 71, 2499, 17 ) end addCommandHandler("visitjail", visit)
-
One more thing, i tried making it so someone can type, /visitjail and they will be warped to a location. It for some reason didnt work. Can you help me out here? function getPlayerFromPartOfName(playerPart) local pl = getPlayerFromName(playerPart) if isElement(pl) then return pl else for i,v in ipairs (getElementsByType ("player")) do if (string.find(getPlayerName(v),playerPart)) then return v end end end end function Jail (player, command, name) if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(player)), aclGetGroup ( "Admin" ) ) then local thePlayer = getPlayerFromPartOfName(name) if not thePlayer then return end if getElementData( thePlayer, "isJailed") then outputChatBox("This player is already in jail.",player,255,0,0) return end setElementData(thePlayer, "jailSkin", getElementModel ( thePlayer )) setElementModel ( thePlayer, 22 ) setElementPosition ( thePlayer, 52, 2483, 21 ) takeAllWeapons ( getRootElement() ) setElementData ( thePlayer, "isJailed", true ) outputChatBox (getPlayerName(thePlayer).." has been jailed", getRootElement(), 255, 0, 0, true ) else outputChatBox ("You cannot use this command!", player, 255, 0, 0, true ) end end addCommandHandler("jail",Jail) function Unjail (player, command, name) if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(player)), aclGetGroup ( "Admin" ) ) then local thePlayer = getPlayerFromPartOfName(name) if not thePlayer then return end if not getElementData( thePlayer, "isJailed") then outputChatBox("This player is not in jail.",player,255,0,0) return end setElementPosition ( thePlayer, 72, 2484, 16.3 ) setElementModel ( thePlayer, tonumber(getElementData(thePlayer,"jailSkin"))) setElementData ( thePlayer, "isJailed", false ) outputChatBox (getPlayerName(thePlayer).." has been unjailed. Be good now, "..getPlayerName (thePlayer), getRootElement(), 0, 255, 0, true ) else outputChatBox ("You cannot unjail yourself!", player, 255, 0, 0, true ) end end addCommandHandler("unjail",Unjail) ped1inside = createPed ( 71, 69, 2503, 17) setPedRotation (ped1inside, 180) function respawn() local x,y,z = getElementPosition(source) local rx,ry,rz = getElementRotation(source) setTimer(createPed, 60000, 1, 71, x,y,z,rz) if isElement(ped1inside) then destroyElement(ped1inside) end end addEventHandler("onPedWasted",ped1inside,respawn) function visit (player) setElementPosition ( thePlayer, 72, 2484, 16.3 ) end addCommandHandler("visitjail", visit)
-
For this script when you type /jail joe and the full name is joedajoester it will say joe has been jailed. How do i make it so it will get the player name and output the full name?? function getPlayerFromPartOfName(playerPart) local pl = getPlayerFromName(playerPart) if isElement(pl) then return pl else for i,v in ipairs (getElementsByType ("player")) do if (string.find(getPlayerName(v),playerPart)) then return v end end end end function Jail (player, command, name) if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(player)), aclGetGroup ( "Admin" ) ) then local thePlayer = getPlayerFromPartOfName(name) if not thePlayer then return end if getElementData( thePlayer, "isJailed") then outputChatBox("This player is already in jail.",player,255,0,0) return end setElementData(thePlayer, "jailSkin", getElementModel ( thePlayer )) setElementModel ( thePlayer, 22 ) setElementPosition ( thePlayer, 52, 2483, 21 ) takeAllWeapons ( getRootElement() ) setElementData ( thePlayer, "isJailed", true ) outputChatBox (name.." has been jailed", getRootElement(), 255, 0, 0, true ) else outputChatBox ("You cannot use this command!", player, 255, 0, 0, true ) end end addCommandHandler("jail",Jail) function Unjail (player, command, name) if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(player)), aclGetGroup ( "Admin" ) ) then local thePlayer = getPlayerFromPartOfName(name) if not thePlayer then return end if not getElementData( thePlayer, "isJailed") then outputChatBox("This player is not in jail.",player,255,0,0) return end setElementPosition ( thePlayer, 72, 2484, 16.3 ) setElementModel ( thePlayer, tonumber(getElementData(thePlayer,"jailSkin"))) setElementData ( thePlayer, "isJailed", false ) outputChatBox (name.." has been unjailed. Be good now, "..name, getRootElement(), 0, 255, 0, true ) else outputChatBox ("You cannot unjail yourself!", player, 255, 0, 0, true ) end end addCommandHandler("unjail",Unjail) ped1inside = createPed ( 71, 69, 2503, 17) setPedRotation (ped1inside, 180) function respawn() local x,y,z = getElementPosition(source) local rx,ry,rz = getElementRotation(source) setTimer(createPed, 60000, 1, 71, x,y,z,rz) if isElement(ped1inside) then destroyElement(ped1inside) end end addEventHandler("onPedWasted",ped1inside,respawn)
-
Ok, but should i download it? I have no clue what to do because why is it free? You have to buy windows 8 when it comes out and upgrade ur pc. Pleas help
-
Hi, im wondering about windows 8. Theres a developers beta version on microsoft's website. Should i get it? will mta be compatible with it? Does anyone know about windows 8 i am not a developer should i still get it?
-
it still says couldnt parse
-
In scripting how would u get what's typed in the console along the command like /pm playerfgf hii
-
Hi I wanna edit the vote system so you can vote anything but how would I make it so I can get what the player types like /vote should I jump off this? And it would vote that.
-
So they each needed their own line?
-
Whats wrong? It says couldnt parse script. If not how do i get the script from gui editor? right click and output code? GUIEditor_Memo = {} GUIEditor_Image = {} window_rules = guiCreateWindow(152,115,721,549,"Rules",false) guiWindowSetMovable(window_rules,false) guiWindowSetSizable(window_rules,false) GUIEditor_Image[1] = guiCreateStaticImage(270,31,182,129,"images/mtalogo.png",false,window_rules) GUIEditor_Memo[1] = guiCreateMemo(27,166,670,374,"\n Rules! \nServer policy: All staff members shall treat all players with great kindness and respect. \n\n1. Deathmatching is allowed, but stop means stop. \n \n2. No hacking or glitch abusing. If you see someone doing this please use /report and a the problem will be dealt with. \n \n3. Do not spam the chat, commands, or the map with cars. \n \n4. Respect all players, be kind and please do not annoy anyone. \n \n5. If you see a staff member abusing or being rude please use /report and the problem will be dealt with. \n \nIf you see anyone breaking these rules please contact a staff member by typing /report and the problem will be dealt with.\n\nEnjoy and have fun!\n -The JWF team",false,window_rules) guiMemoSetReadOnly(GUIEditor_Memo[1],true) button_accept = guiCreateButton(66,55,187,76,"Accept!",false,window_rules) button_decline = guiCreateButton(477,52,188,77,"Decline",false,window_rules)
-
Lol thank you all