Jump to content

Thivenin

Members
  • Posts

    41
  • Joined

  • Last visited

Thivenin's Achievements

Rat

Rat (9/54)

0

Reputation

  1. addCommandHandler("wss", function(sender, command, ...) local accName = getAccountName ( getPlayerAccount ( sender ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) or isObjectInACLGroup ("user."..accName, aclGetGroup ( "Moderator" ) ) then local message = table.concat( {...} , " " ) if message ~= "" then local sendTo = aclGroupListObjects(aclGetGroup("Admin")) or aclGroupListObjects(aclGetGroup("Moderator")) for i,b in ipairs(sendTo) do if not getElementData(b, getRootElement(), "wssChatDisable") then outputChatBox("WSS Chat: ".. getPlayerName(sender) ..":".. message, b, 255, 0, 0, true) end end end end end ) Hey guys, I want to create a new chatbox for Mods and Admins but it's spamming the message to everyone and colorcodes aren't appearing I want colorcode to be there, stop the spamming message and the message visible by admins and mods only line 9 : expected element at argument 1, got string 'user.Diesulke' expected element at argument 1, got string 'user.Thivenin' doing it to every admin/mods
  2. Hey everyone, I'm playing a server wich is alive since 1 year now, this server is called Why So Serious we've got an awesome community with alot of fun like the server name says we are not always serious we are mostly fun. We've got our own script ( scripted by Beatles1 and Funstein ) we also have some awesome mod ! here some screen of our mods : The Fast and Furious 6 car can jump by pressing SHIFT and the flying car can fly by pressing SHIFT (they are very expensive) we also have some skin mod ( purchasable by gangs and squad ) We got more and more mods but I can't post them all that would take me a day, everyday we reach 50 Player The IP is : mtasa://94.23.54.227:22003 If you will come don't forget to read F1 and if you need help you can ask to WSS Member or Probie ( We've got this tag WSS| or WSS*| ) Here is the forum : wssrpg.co.uk Thanks to read and maybe cya in game !
  3. not sure that will work tbh, because I want a time different for copTeams and for crimTeams
  4. Thivenin

    Prison Gate

    hai all, I have a problem first here the script : --Teams copTeams = { ["Police"] = true, ["Squads"] = true, ["SCO19"] = true, ["United States Secret Service"] = true, ["The United States Army"] = true } criminalTeams = { ["Criminals"] = true, ["The Confederate States Army"] = true, ["Gangs"] = true, ["Night Factory"] = true } --First door FirstDoor = createObject ( 2929, 288.299, 1411.199, 11.199, 0, 0, 90 ) FirstMarker = createMarker ( 288.7, 1411.5, 9.399, "cylinder", 5, 255, 0, 0, 0 ) function firstDoorCops ( markerHit, matchingDimension ) if copTeams [ getElementData ( source, "team" ) ] then if ( markerHit == FirstMarker ) then moveObject ( FirstDoor, 5000, 288.299, 1411.199, 13.899 ) end end end addEventHandler ( "onPlayerMarkerHit", getRootElement(), firstDoorCops ) function firstDoorCrims ( markerHit, matchingDimension ) if CriminalTeams [ getElementData ( source, "team" ) ] then if ( markerHit == FirstMarker ) then moveObject ( FirstDoor, 20000, 288.299, 1411.199, 13.899 ) end end end addEventHandler ( "onPlayerMarkerHit", getRootElement(), firstDoorCrims ) --secoundDoor SecoundDoor = createObject ( 2929, 204, 1411.19, 11.199, 0, 0, 90 ) SecoundMarker = createMarker ( 208.6, 1410.9, 9.6, "cylinder", 255, 0, 0, 0 ) function secoundDoorCrims ( markerHit, matchingDimension ) if CriminalTeams [ getElementData ( source, "team" ) ] then if ( markerHit == SecoundMarker ) then moveObject ( SecoundDoor, 20000, 204, 1411.199, 13.899 ) end end end addEventHandler ( "onPlayerMarkerHit", getRootElement(), secoundDoorCrims ) the problem is when I hit the marker in one of the right team it's making this error "attempt to index global 'criminalTeams'" to the line 47 and 61 ( 43 and 47 for you ) tanks for help in advance ^^
  5. opening/closing well, but I'm not even in the team and it's working
  6. gatecol = createColCircle ( 1105.59, -1794.6, 10 ) firstObject = createObject ( 974, 1105.59, -1794.6, 18.39, 0, 0, 90 ) secoundObject = createObject ( 974, 1105.59, -1798.99, 18.39, 0, 0, 90 ) moving = false function move ( thePlayer ) if ( getTeamName ( getPlayerTeam ( thePlayer ) ) == "United States Olympic Committee" ) then if ( moving ) then return end if ( eventName == "onColShapeHit" ) then moveObject ( firstObject, 1500, 1105.59, -1794.6, 18.39 ) moveObject ( secoundObject, 1500, 1105.59, -1798.99, 18.39 ) moving = true else moveObject ( firstObject, 1500, 1105.59, -1794.6, 0 ) moveObject ( secoundObject, 1500, 1105.59, -1798.99, 0 ) moving = true end end end addEventHandler ( "onColShapeHit", gatecol, move ) addEventHandler ( "onColShapeLeave", gatecol, move ) hai all, I need help on that script, the gate is not opening ( I'm well in the team but not opening )
  7. oops I failed, I meant start a time when we hit startMarker and stop that time when we hit finishMarker
  8. hai, I wanna start a marker when the player hit the marker "startMarker" and stop it and tell you our time startMarker = createMarker ( -5475, 2376, 15, "checkpoint", 8, 250, 0, 0, 255 ) finishMarker = createMarker ( -5460, 2376, 15, "checkpoint", 8, 250, 0, 0, 255 ) local seconds = 0 function startRace () if ( markerHit == startMarker ) then timer = setTimer(seconds_function, 1000, 0) end end addEventHandler("onMarkerHit", getRootElement(), startRace) function seconds_function () seconds = seconds + 1 end function finishRace (MarkerHit, matchingDimension) if matchingDimension == true and markerHit == finishMarker then outputChatBox(seconds, source) killTimer(timer) resetTimer(timer) seconds = 0 end end addEventHandler("onMarkerHit", getRootElement(), finishRace) I found 2 function in this forum and edited a bit, I haven't got any error
  9. u.u SAUR player are good scripter ^^ first one doesn't work, same errors but secound one works, thanks you very much I finished my long script wich I'm doing since thursday
  10. hai, I need again help.... like everyday ^^ local allowedTeams = { ["USOC Member"] = true } firstObject = createObject ( 974, 1153.8, -1766.09, 18.39 ) secoundObject = createObject ( 974, 1154.69, -1766.09, 18.39 ) local open = false function USOCDoor () local playerTeam = getPlayerTeam ( source ) if getTeamName ( playerTeam ) == "USOC Member" then if open then moveObject ( firstObject, 3000, 1153.8, -1766.09, 18.39 ) moveObject ( secoundObject, 3000, 1154.69, -1766.09, 18.39 ) open = true else if not open then moveObject ( firstObject, 3000, 1153.8, -1766.09, 0 ) moveObject ( secoundObject, 3000, 1154.69, -1766.09, 0 ) end end end end addCommandHandler ( "USOCdoor", USOCDoor ) that should open/close the door if we do /USOCdoor and only if we are in USOC Member team but I have 2 error : Bad argument @ 'getPlayerTeamName' Bad argument @ 'getTeamName' I tried alot of thing, nothing working
  11. before testing your script, I were saying "if his script work, I will kill that guy and I will get his scripting skill" I think I know what to do, what is your real address ? joke, that is working perfectly, thank you very much ( again )
  12. both doesn't work ^^ there is not any error, it's not repairing the car and the marker isn't despawning
  13. no, I want that when we take the marker, it's giving us a repair and we can take is only every 30 scd
  14. as it's on the same screen I post it here I have a problem I explain after the pub, jk : DDseventhMarker = createMarker ( -1410, 998, 1025, "corona", 2, 250, 0, 250, 255 ) setElementInterior ( DDseventhMarker, 15 ) function DDrepair ( markerHit, matchingDimension ) if ( markerHit == DDseventhMarker ) then setMarkerColor ( DDseventhMarker, 250, 0, 250, 0 ) thePlayer = source fixVehicle ( thePlayer ) timer = setTimer ( DDrepair, 30000, 1 ) end end killTimer ( timer ) addEventHandler ( "onPlayerMarkerHit", getRootElement(), DDrepair ) I want to make this marker as a repair and when we take it, it's taking 30 scd for get it back... but I have an error that I can't understand : Bad argument @ 'killTimer' [Expected lua-timer at argument 1, got nil]
  15. I can't answer you, I saw that it's needed on another script, so I putted it
×
×
  • Create New...