WiBox
Members-
Posts
234 -
Joined
-
Last visited
Everything posted by WiBox
-
You change thePlayer to playerName ? local account = getPlayerAccount (thePlayer) -- see this? make it --make it like that: local account = getPlayerAccount (playerName) and if change thePlayer to playerName didn't work then try this: function requestAdmin(playerName) exports.SANGcommands:sendMessage("Your request for a staff member has been accepted. One of our staff members will be with you soon", 225,255,255) local account = getPlayerAccount (playerName) if isObjectInACLGroup ("user." .. getAccountName(string(account)), aclGetGroup ("Admin", "SuperModerator", "Moderator")) and type == 0 then outputChatBox("You are required by ".. getPlayerFromName(playerName .. playerName) end end addCommandHandler("adminreq", requestAdmin) -- use the first which is above(up) this message if it didn't work then try which is below(down) this message function requestAdmin() for _,playerName in ipairs ( getElementsByType("player") ) do exports.SANGcommands:sendMessage("Your request for a staff member has been accepted. One of our staff members will be with you soon", 225,255,255) local account = getPlayerAccount (playerName) if isObjectInACLGroup ("user." .. getAccountName(string(account)), aclGetGroup ("Admin", "SuperModerator", "Moderator")) and type == 0 then outputChatBox("You are required by ".. getPlayerFromName(playerName .. playerName) end end end addCommandHandler("adminreq", requestAdmin) Try the first one if it didn't work. then try the second one, but the first one should work if it didn't then try the second one~
-
function requestAdmin(playerName) exports.SANGcommands:sendMessage("Your request for a staff member has been accepted. One of our staff members will be with you soon", 225,255,255) local account = getPlayerAccount (thePlayer) if isObjectInACLGroup ("user." .. getAccountName(string(account)), aclGetGroup ("Admin", "SuperModerator", "Moderator")) and type == 0 then outputChatBox("You are required by ".. getPlayerFromName(playerName .. playerName) end end addCommandHandler("adminreq", requestAdmin) Mate the function requestAdmin(playerName) at local account = getPlayerAccount (thePlayer) you used thePlayer you should use playerName You can see it now ? Try it now, I think that was the only problem..
-
Try it now, of using playerName at line 4 you used thePlayer
-
Edit: I used from line 29 to line 75 for _,player in ipairs(getElementsByType("player")) do ............. end But I didn't understand why that happen with me? { bad argument @ 'doesPedHaveJetpack' [ Expected ped at argument 1, got nil] bad argument @ 'isPedInVehicle' [ Expected ped at argument 1, got nil] } Not only those two, everything in this function warpPerson using (player) it said {expected ped at argument 1, got nil} can someone tell me why that happen with me? And thanks ~
-
Hey it can be easier like. add a command so you fall from where you want [as using /teleport x y z ] and it give parachute, how about that?
-
A new problem appeared, it worked first but then they tell me: bd argument @ 'doesPedHaveJetpack' [ Expected ped at argument 1, got nil] bad argument @ 'isPedInVehicle' [ Expected ped at argument 1, got nil] Everything which I used with it (player) as a argument it saying a nil value? Why is that happening? First time it happen to me I don't know how to fix it ..
-
Thanks for explaining this to me I appreciate that
-
function DamageUponUsingEventJoining (player) timer3 = setTimer( function (player) local time4 = 20 if ( time4 > 0 ) then for _,localPlayer in ipairs ( getElementsByType("player")) do outputChatBox("If you taked damage from less then 20 seconds you can't join this event!",player, 255, 99, 71) end time4 = time4 - 1 end end, 20000, 0) end addEventHandler("onPlayerDamage", root, DamageUponUsingEventJoining) I could not try it on my self, so I needed to know if it like that because I could not test it...
-
No it just I forget to add , createEvent() , and I was checking the file and I saw I forget to add this ^-^ , and I made this topic thinking if I made something wrong in this coding without realize I forget to add createEvent() on setTimer ^-^
-
Thank you~ I'll check them,,
-
Mate I wanted to change from false to true in warp_event but I fix it anyway thanks
-
I'm still searching from the time I made this topic but I don't know how the Data i should add on elementdata..
-
No problem I fix it, what I mean, I create this script, but the DENdxmsg script is from a old friend who got that script and he gave me it. Anyway Thanks for you're help!
-
Mate it is, just the DEN I take it from an old friend , Is there a way I can like change the warp_event to true, because I'm making a auto event, so I made a way to start event with a function but I didn't know how to add it to another function,,, function name is= startEvent Thanks for help
-
If you can give an example I'll be grateful, because I don't know how to add if the player got damage from less then 20 second...
-
local spawnpoints1 = { {-2309.55859375, 2488.8388671875, 188}, {-2366.84765625, 2276.849609375, 188}, {-2566.3779296875, 2234.146484375, 188}, {-2704.232421875, 2390.80078125, 188}, {-2627.060546875, 2578.6552734375, 188}, {-2453.2021484375, 2611.2802734375, 188}, {-2311.50390625, 2474.6533203125, 188}, {-2368.353515625, 2270.7685546875, 188}, {-2533.52734375, 2225.6337890625, 188}, {-2669.2685546875, 2309.62890625, 188}, {-2680.62890625, 2501.0693359375, 188}, {-2592.1572265625, 2598.8330078125, 188}, {-2409.0634765625, 2594.9189453125, 188}, {-2323.4765625, 2475.3525390625, 188}, {-2367.91015625, 2287.9306640625, 188}, } warp_warpedUsers = {} warp_savePos = {} warp_warpLimit = 0 warp_warps = 15 warp_event = false wapx, wapy, wapz = unpack(spawnpoints1[math.random(1,#spawnpoints1)]) warp_dimension = 0 warp_interior = 0 function warpPerson(player) local team = getPlayerTeam(player) if (not team) then return end if (warp_event == false) then return end if ( doesPedHaveJetPack(player)) then outputChatBox("You can't join this event if you're using jetpack.",player, 255, 0, 0) end if (isPedInVehicle(player)) then outputChatBox("You can't join this event if you wasn't on foot.",player, 255, 0, 0) end if (exports.OSCprison:isPlayerJailed(player)) then return outputChatBox("You're in Jail! You can't join the event.", player, 255, 0, 0, true) end if (isPlayerInEvent(player)) then outputChatBox("You have already used the command, if you want to leave the event use the command /leaveevent .", player, 0, 255, 0, true) return end if (tonumber(warp_warps) < tonumber(warp_warpLimit) and warp_event) then if (not getPedOccupiedVehicle(player)) then if (not isPlayerInEvent(player)) then local px, py, pz = getElementPosition(player) local pint, pdim = getElementInterior(player), getElementDimension(player) warp_savePos[getAccountName(getPlayerAccount(player))] = {px, py, pz, pint, pdim} end if (warp_interior == 0) then if (getElementInterior(player) ~= 0 ) then outputChatBox("You should be at the main interior to join the event.",player, 255, 0, 0) end setElementPosition(player, wapx, wapy, wapz) else setElementInterior(player, warp_interior, wapx, wapy, wapz) end setElementDimension(player, warp_dimension) addPlayerToEvent(player) warp_warps = warp_warps + 1 if (tonumber(warp_warps) >= tonumber(warp_warpLimit)) then outputChatBox("The event is now full", root, 0, 255, 0, true) end end else exports.DENdxmsg:createNewDxMessage("The event has reached the limit of " .. (warp_warpLimit) .. " warps", player, 0, 255, 0, true) end end addCommandHandler("joinevent", warpPerson) function addPlayerToEvent(player) if (isElement(player)) then setElementData(player, "a", true) setElementPosition = wapx, wapy, wapz end end As you see I'm trying to make a event but I can't understand where I fail, because I'm not getting warped.. Any help please? And thanks.
-
is there a way I can check if the player is under attack or from last 20 second he was attacked?
-
oh lol I'm using it on Server Side that why didn't work first
-
I changed localPlayer to player and added it into function (player) np it worked anyway thanks
-
oh :fp: , Thanks Attempt to concatenate global 'y' (a nil value) ,, no problem I fix it...
-
I'm trying to do: function getposition (player) outputChatBox("ur position is " .. getElementPosition(player) .. " LOL ",player,0,255,0) end addCommandHandler("pos", getposition) But it only show me the X position how I can make it so it show x, y and z ?
-
Thanks! It worked, I just need to add the time as I need. I appreciate you're help thanks so much ~
-
Thank you, I appreciate you're help! I'll try it.
-
local Time1 = 3600000 function event () function timer() setTimer( function() if Time1 >= 0 then Time1 = Time1 -3000 for _,all in ipairs ( localPlayer ) do outputChatBox("The event will start every one hour once. TimeLeft:"..Time1.." miliseconds(1000 = 1 second).", all, 0, 255, 0) end timer() end end, 600000, 0 ) end end addEventHandler("onResourceStart", root, timer ) Please? can someone fix it? I already tried using in console " debugscript 3 " fixed all bugs but still not working.. any help? I just need to fix this code, and if I made it wrong, from this code I need that each 10 minutes message will be send for all players that the event will start each 1 hour, each 10 minutes i want the message get send and first time said {50 minutes left... 40 minutes left... 30 minutes lefts... 20 minutes left... 10 minutes left.... 0 minutes left...} i want those minutes on ..Time1.. place each 10 minutes it will say how much left... I appreciate for who help me. Even if he at least try to
