Jump to content

Jaysds1

Members
  • Posts

    4,961
  • Joined

  • Last visited

Everything posted by Jaysds1

  1. try sending the image to the back
  2. Can you PM me where you got your SA? I might send you a different type of Pirated GTASA
  3. Jaysds1

    help :(

    Sorry, but we don't know what your talking about??? Are you trying to start every resource in your resources folder?
  4. sorry, but this is a Scripted thing...
  5. try this: --[[***************************************** * * * -|Us|- Teamscript * *-------------------------------------------* * teamscript.lua -- server * * Original by Sniper ** Edited by HyPeX * *********************************************]] local resourceRoot = getResourceRootElement(getThisResource()) --[[************************************************* * Part I: tests, resourcestart * *****************************************************]] local testload local testteam local testacl local usteam local doteam --output load message addEventHandler("onResourceStart", resourceRoot, function () outputChatBox("SCRIPT: -|Us|- & Donator teamscript by HyPeX successfully loaded!") testload = true end) --create Teams addEventHandler("onResourceStart", resourceRoot, function () usteam = createTeam("-|Us|- Members", 2, 134, 183) if (getTeamFromName("-|Us|- Members")) then testteam = true outputChatBox("SCRIPT: -|Us|- Team successfully created!") else outputChatBox("SCRIPT ERROR: -|Us|- Team could not be created!") testteam = false end doteam = createTeam("Donators", 100, 255, 100) if (getTeamFromName("Donators")) then testteam = true outputChatBox("SCRIPT: Donator Team successfully created!") else outputChatBox("SCRIPT ERROR: Donator Team could not be created!") testteam = false end end) --build the "Us" group in ACL addEventHandler("onResourceStart", resourceRoot, function () if(not aclGetGroup("Us"))then outputChatBox("SCRIPT: Creating Us group in ACL...") aclCreateGroup("Us") else outputChatBox("SCRIPT: Group -|Us|- is already added in ACL") end end) --build the "Do" group in ACL addEventHandler("onResourceStart", resourceRoot, function () if (aclGetGroup("Do") == nil) or (aclGetGroup("Do") == false) then outputChatBox("SCRIPT: Creating Do group in ACL...") aclCreateGroup("Do") else outputChatBox("SCRIPT: Group Donators is already added in ACL") end end) --check if THIS resource is added in ACL else output warning addEventHandler("onResourceStart", resourceRoot,function () if not (isObjectInACLGroup("resource." ..getResourceName(getThisResource()), aclGetGroup("Admin"))) then outputChatBox("SCRIPT ERROR: Please add this resource (teamscript) as 'resource.' into the ACL Group 'Admin' else this script won't work!") outputDebugString("SCRIPT ERROR: Please add this resource (teamscript) as 'resource.' into the ACL Group 'Admin' else this script won't work!", 1, 255, 0, 0) testacl = false else testacl = true end end) --[[************************************************* * Part II: manage players * *****************************************************]] --command for adding a player to Us Group function addPlayerToUs(playerSource, commandName, accountName) if (isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(playerSource)), aclGetGroup("Admin"))) then if (accountName) then if (getAccount(accountName)) then aclGroupAddObject (aclGetGroup("Us"), "user."..accountName) outputChatBox("Account '"..accountName.." #00ff00' succesfully added to the Us ACL group", playerSource, 0, 255, 0, true) setPlayerTeam(getAccountPlayer(getAccount(accountName)), usteam) else outputChatBox("Account could not be found! Please enter the correct accountname!", playerSource, 255, 0, 0, true) end --forgot this end else outputChatBox ("No account name specified.", playerSource, 255, 0, 0, true) outputChatBox ("Syntax: /addus [accountName]", playerSource, 255, 0, 0, true) end else outputChatBox ("Sorry but only admins can use this!", playerSource, 255, 0, 0, true) end end addCommandHandler("addus", addPlayerToUs) --command for adding a player to Do Group function addPlayerToDo (playerSource, commandName, accountName) if (isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(playerSource)), aclGetGroup("Admin"))) then if (accountName) then if (getAccount(accountName)) then aclGroupAddObject (aclGetGroup("Do"), "user."..accountName) outputChatBox("Account '"..accountName.."#00ff00' succesfully added to the Do ACL group", playerSource, 0, 255, 0, true) setPlayerTeam(getAccountPlayer(getAccount(accountName)), doteam) else outputChatBox("Account could not be found! Please enter the correct accountname!", playerSource, 255, 0, 0, true) end else outputChatBox ("No account name specified.", playerSource, 255, 0, 0, true) outputChatBox ("Syntax: /adddo [accountName]", playerSource, 255, 0, 0, true) end else outputChatBox ("Sorry but only admins can use this!", playerSource, 255, 0, 0, true) end end addCommandHandler("adddo", addPlayerToDo) --command for removing a player from the Us Group function removePlayerFromUs (playerSource, commandName, accountName) if (isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(playerSource)), aclGetGroup("Admin"))) then if (accountName) then if (getAccount(accountName)) then if (isObjectInACLGroup("user." ..accountName, aclGetGroup("Us"))) then aclGroupRemoveObject (aclGetGroup("Us"), "user."..accountName) outputChatBox("Account '"..accountName.."#00ff00' succesfully removed from the Us ACL group", playerSource, 0, 255, 0, true) else outputChatBox("Account could not be found in ACL to delete!", playerSource, 255, 0, 0, true) end else outputChatBox("Account could not be found! Please enter the correct accountname!", playerSource, 255, 0, 0, true) end else outputChatBox ("No account name specified.", playerSource, 255, 0, 0, true) outputChatBox ("Syntax: /addus [accountName]", playerSource, 255, 0, 0, true) end else outputChatBox ("Sorry but only admins can use this!", playerSource, 255, 0, 0, true) end end addCommandHandler("removeus", removePlayerFromUs) --command for adding moderators function addPlayerToUs (playerSource, commandName, accountName) if (isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(playerSource)), aclGetGroup("Admin"))) then if (accountName) then if (getAccount(accountName)) then aclGroupAddObject (aclGetGroup("Moderator"), "user."..accountName) outputChatBox("Account '"..accountName.."#00ff00' succesfully added to the Moderator group", playerSource, 0, 255, 0, true) else outputChatBox("Account could not be found! Please enter the correct accountname!", playerSource, 255, 0, 0, true) end else outputChatBox ("No account name specified.", playerSource, 255, 0, 0, true) outputChatBox ("Syntax: /addmod [accountName]", playerSource, 255, 0, 0, true) end else outputChatBox ("Sorry but only admins can use this!", playerSource, 255, 0, 0, true) end end addCommandHandler("addmod", addPlayerToUs) --command for adding supermoderators function addPlayerToUs (playerSource, commandName, accountName) if (isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(playerSource)), aclGetGroup("Admin"))) then if (accountName) then if (getAccount(accountName)) then aclGroupAddObject (aclGetGroup("SuperModerator"), "user."..accountName) outputChatBox("Account '"..accountName.."#00ff00' succesfully added to the SuperModerator group", playerSource, 0, 255, 0, true) else outputChatBox("Account could not be found! Please enter the correct accountname!", playerSource, 255, 0, 0, true) end else outputChatBox ("No account name specified.", playerSource, 255, 0, 0, true) outputChatBox ("Syntax: /addsmod [accountName]", playerSource, 255, 0, 0, true) end else outputChatBox ("Sorry but only admins can use this!", playerSource, 255, 0, 0, true) end end addCommandHandler("addsmod", addPlayerToUs) --[[************************************************* * Part II: manage events if player joins etc.* *****************************************************]] --add player to Us team if is in ACL on Login function addUsPlayerToTeam(oldacc, account, auto) if (isObjectInACLGroup( "user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Us"))) and (string.find(getPlayerName(source), "-|Us|-"))then setPlayerTeam(source, usteam) outputChatBox("Welcome back " .. getPlayerName(source) .. "#e76a0c to -|Us|-!",source, 231, 106, 12, true) playSoundFrontEnd(source, 1) end if (isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Do"))) then setPlayerTeam(source, doteam) outputChatBox("Welcome back " .. getPlayerName(source) .. "#e76a0c to Donators!",source, 231, 106, 12, true) playSoundFrontEnd(source, 1) end end addEventHandler("onPlayerLogin",root, addUsPlayerToTeam) --check Us player after someone changed his nick function checkIfPlayerIsUsAfterNickchange(oldnick, nick) if (string.find(nick, "-|Us|-")) and not (getPlayerTeam(source) == usteam) then if (isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Us"))) then setPlayerTeam(source,usteam) outputChatBox("Welcome back " .. nick .. "#e76a0c to -|Us|-!",source, 231, 106, 12, true) playSoundFrontEnd(source, 1) else setTimer(checkLoginOrKick, 15000, 1, source) outputChatBox("Please login within 15 secs or you'll be kicked!", source, 255, 0, 0, true) end end end addEventHandler("onPlayerChangeNick", getRootElement(), checkIfPlayerIsUsAfterNickchange) function checkUsPlayerOnJoin() if (string.find(getPlayerName(source),"-|Us|-")) then setTimer(checkLoginOrKick, 60000, 1, source) outputChatBox("Please login within 60 secs or you'll be kicked!", source, 255, 0, 0, true) setTimer(outputChatBox, 50000, 1, "Please login now! You have 10 secs left or you'll get kicked!", source, 255, 0, 0, true) --changenick(source) end end addEventHandler("onPlayerJoin", getRootElement(), checkUsPlayerOnJoin) function checkLoginOrKick(player) if not (getPlayerTeam(player) == usteam) and (string.find(getPlayerName(player),"-|Us-")) then kickPlayer(player, "Player with Us tag not logged in") end end --[[************************************************* * Part III: Us stuff * *****************************************************]] -- banned words, chat color function setPlayerChatColor(message, messageType) if (messageType == 0) then local thePlayer = getPlayerName(source) cancelEvent() if (getPlayerTeam(source) == usteam) then local team = getPlayerTeam(source)
  6. try this: iphone_Window = guiCreateWindow(0.0401,0.2232,0.1255,0.3046,"",true) main = guiCreateStaticImage(0.3942,0.8146,0.2033,0.1307,"images/iphonebutton.png",true,iphone_Window) GUIEditor_Label1 = guiCreateLabel(0.0456,0.7568,0.9087,0.0547,"_______________________________",true,iphone_Window) guiLabelSetColor(GUIEditor_Label1,0,0,0) guiSetFont(GUIEditor_Label1,"default-bold-small") GUIEditor_Label2 = guiCreateLabel(0.0432,0.076,0.029,0.7204,"|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n",true,iphone_Window) guiLabelSetColor(GUIEditor_Label2,0,0,0) guiSetFont(GUIEditor_Label2,"default-bold-small") GUIEditor_Label3 = guiCreateLabel(0.9295,0.076,0.029,0.7204,"|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n",true,iphone_Window) guiLabelSetColor(GUIEditor_Label3,0,0,0) guiSetFont(GUIEditor_Label3,"default-bold-small") GUIEditor_Label4 = guiCreateLabel(0.0456,0.0486,0.9087,0.0547,"_______________________________",true,iphone_Window) guiLabelSetColor(GUIEditor_Label4,0,0,0) guiSetFont(GUIEditor_Label4,"default-bold-small") GUIEditor_Image2 = guiCreateStaticImage(0.1867,0.155,0.2241,0.1307,"images/mp3.png",true,iphone_Window) GUIEditor_Image3 = guiCreateStaticImage(0.5851,0.155,0.2199,0.1307,"images/notizen.png",true,iphone_Window) GUIEditor_Image4 = guiCreateStaticImage(0.5768,0.5775,0.2241,0.1459,"images/zeit.png",true,iphone_Window) GUIEditor_Image5 = guiCreateStaticImage(0.5809,0.3647,0.2158,0.1398,"images/sms.png",true,iphone_Window) GUIEditor_Image6 = guiCreateStaticImage(0.195,0.3678,0.1992,0.1277,"images/finfo.png",true,iphone_Window) GUIEditor_Image7 = guiCreateStaticImage(0.1909,0.5745,0.2033,0.1368,"images/hilfe.png",true,iphone_Window) GUIEditor_ImageSchwarz1 = guiCreateStaticImage(0.0372,0.0638,0.9256,0.9088,"images/schwarz.png",true,iphone_Window) function schwarz1(state) if state == "left" then if source == GUIEditor_ImageSchwarz1 then guiBringToFront(main) guiBringToFront(GUIEditor_Image2) guiBringToFront(GUIEditor_Image3) guiBringToFront(GUIEditor_Image4) guiBringToFront(GUIEditor_Image5) guiBringToFront(GUIEditor_Image6) guiBringToFront(GUIEditor_Image7) guiBringToFront(GUIEditor_Label1) guiBringToFront(GUIEditor_Label2) guiBringToFront(GUIEditor_Label3) guiBringToFront(GUIEditor_Label4) -- bring the labels up after the images are brought to the front end end end addEventHandler("onClientGUIClick",guiRoot, schwarz1,true) --don't forget the boolean at the end. (true for source's and false for individual buttons)
  7. oh, lol, Can you run this MTA Diag and post the PasteBin URL here please This is to see what you currently have.
  8. Jaysds1

    Xampp

    lol, he needs a Browser to get to the localhost... this is why I like Firefox, but Chrome is good to, Anyways, after closing all the programs, open Xampp and the browser... start everything on your Xampp and try http://localhost on your computer
  9. ok, Mods either slow down MTA or makes MTA crash, for now, I suggest have to folders of SA and another Downloaded MTA for the seconds SA in-case you want to use the one with the mods...
  10. lol, well, you could put everyone in a table (scripting side) then do your countdown, after that, you could start a map for those players and set the markers visible to the players in the table, and after the players reach the last marker, you could make an event called onRaceFinish... it'll take a long time to finish but it's possible
  11. nah, I don't recommend that... It'll just waste time and the server is going to lag.
  12. ok, got it, try this: --[[***************************************** * * * -|Us|- Teamscript * *-------------------------------------------* * teamscript.lua -- server * * Original by Sniper ** Edited by HyPeX * *********************************************]] local resourceRoot = getResourceRootElement(getThisResource()) --[[************************************************* * Part I: tests, resourcestart * *****************************************************]] local testload local testteam local testacl local usteam local doteam --output load message addEventHandler("onResourceStart", resourceRoot, function () outputChatBox("SCRIPT: -|Us|- & Donator teamscript by HyPeX successfully loaded!") testload = true end) --create Teams addEventHandler("onResourceStart", resourceRoot, function () usteam = createTeam("-|Us|- Members", 2, 134, 183) if (getTeamFromName("-|Us|- Members")) then testteam = true outputChatBox("SCRIPT: -|Us|- Team successfully created!") else outputChatBox("SCRIPT ERROR: -|Us|- Team could not be created!") testteam = false end doteam = createTeam("Donators", 100, 255, 100) if (getTeamFromName("Donators")) then testteam = true outputChatBox("SCRIPT: Donator Team successfully created!") else outputChatBox("SCRIPT ERROR: Donator Team could not be created!") testteam = false end end) --build the "Us" group in ACL addEventHandler("onResourceStart", resourceRoot, function () if(not aclGetGroup("Us"))then outputChatBox("SCRIPT: Creating Us group in ACL...") aclCreateGroup("Us") else outputChatBox("SCRIPT: Group -|Us|- is already added in ACL") end end) --build the "Do" group in ACL addEventHandler("onResourceStart", resourceRoot, function () if (aclGetGroup("Do") == nil) or (aclGetGroup("Do") == false) then outputChatBox("SCRIPT: Creating Do group in ACL...") aclCreateGroup("Do") else outputChatBox("SCRIPT: Group Donators is already added in ACL") end end) --check if THIS resource is added in ACL else output warning addEventHandler("onResourceStart", resourceRoot,function () if not (isObjectInACLGroup("resource." ..getResourceName(getThisResource()), aclGetGroup("Admin"))) then outputChatBox("SCRIPT ERROR: Please add this resource (teamscript) as 'resource.' into the ACL Group 'Admin' else this script won't work!") outputDebugString("SCRIPT ERROR: Please add this resource (teamscript) as 'resource.' into the ACL Group 'Admin' else this script won't work!", 1, 255, 0, 0) testacl = false else testacl = true end end) --[[************************************************* * Part II: manage players * *****************************************************]] --command for adding a player to Us Group function addPlayerToUs(playerSource, commandName, accountName) if (isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(playerSource)), aclGetGroup("Admin"))) then if (accountName) then if (getAccount(accountName)) then aclGroupAddObject (aclGetGroup("Us"), "user."..accountName) outputChatBox("Account '"..accountName.." #00ff00' succesfully added to the Us ACL group", playerSource, 0, 255, 0, true) setPlayerTeam(getAccountPlayer(getAccount(accountName)), usteam) else outputChatBox("Account could not be found! Please enter the correct accountname!", playerSource, 255, 0, 0, true) end --forgot this end else outputChatBox ("No account name specified.", playerSource, 255, 0, 0, true) outputChatBox ("Syntax: /addus [accountName]", playerSource, 255, 0, 0, true) end else outputChatBox ("Sorry but only admins can use this!", playerSource, 255, 0, 0, true) end end addCommandHandler("addus", addPlayerToUs) --command for adding a player to Do Group function addPlayerToDo (playerSource, commandName, accountName) if (isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(playerSource)), aclGetGroup("Admin"))) then if (accountName) then if (getAccount(accountName)) then aclGroupAddObject (aclGetGroup("Do"), "user."..accountName) outputChatBox("Account '"..accountName.."#00ff00' succesfully added to the Do ACL group", playerSource, 0, 255, 0, true) setPlayerTeam(getAccountPlayer(getAccount(accountName)), doteam) else outputChatBox("Account could not be found! Please enter the correct accountname!", playerSource, 255, 0, 0, true) end else outputChatBox ("No account name specified.", playerSource, 255, 0, 0, true) outputChatBox ("Syntax: /adddo [accountName]", playerSource, 255, 0, 0, true) end else outputChatBox ("Sorry but only admins can use this!", playerSource, 255, 0, 0, true) end end addCommandHandler("adddo", addPlayerToDo) --command for removing a player from the Us Group function removePlayerFromUs (playerSource, commandName, accountName) if (isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(playerSource)), aclGetGroup("Admin"))) then if (accountName) then if (getAccount(accountName)) then if (isObjectInACLGroup("user." ..accountName, aclGetGroup("Us"))) then aclGroupRemoveObject (aclGetGroup("Us"), "user."..accountName) outputChatBox("Account '"..accountName.."#00ff00' succesfully removed from the Us ACL group", playerSource, 0, 255, 0, true) else outputChatBox("Account could not be found in ACL to delete!", playerSource, 255, 0, 0, true) end else outputChatBox("Account could not be found! Please enter the correct accountname!", playerSource, 255, 0, 0, true) end else outputChatBox ("No account name specified.", playerSource, 255, 0, 0, true) outputChatBox ("Syntax: /addus [accountName]", playerSource, 255, 0, 0, true) end else outputChatBox ("Sorry but only admins can use this!", playerSource, 255, 0, 0, true) end end addCommandHandler("removeus", removePlayerFromUs) --command for adding moderators function addPlayerToUs (playerSource, commandName, accountName) if (isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(playerSource)), aclGetGroup("Admin"))) then if (accountName) then if (getAccount(accountName)) then aclGroupAddObject (aclGetGroup("Moderator"), "user."..accountName) outputChatBox("Account '"..accountName.."#00ff00' succesfully added to the Moderator group", playerSource, 0, 255, 0, true) else outputChatBox("Account could not be found! Please enter the correct accountname!", playerSource, 255, 0, 0, true) end else outputChatBox ("No account name specified.", playerSource, 255, 0, 0, true) outputChatBox ("Syntax: /addmod [accountName]", playerSource, 255, 0, 0, true) end else outputChatBox ("Sorry but only admins can use this!", playerSource, 255, 0, 0, true) end end addCommandHandler("addmod", addPlayerToUs) --command for adding supermoderators function addPlayerToUs (playerSource, commandName, accountName) if (isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(playerSource)), aclGetGroup("Admin"))) then if (accountName) then if (getAccount(accountName)) then aclGroupAddObject (aclGetGroup("SuperModerator"), "user."..accountName) outputChatBox("Account '"..accountName.."#00ff00' succesfully added to the SuperModerator group", playerSource, 0, 255, 0, true) else outputChatBox("Account could not be found! Please enter the correct accountname!", playerSource, 255, 0, 0, true) end else outputChatBox ("No account name specified.", playerSource, 255, 0, 0, true) outputChatBox ("Syntax: /addsmod [accountName]", playerSource, 255, 0, 0, true) end else outputChatBox ("Sorry but only admins can use this!", playerSource, 255, 0, 0, true) end end addCommandHandler("addsmod", addPlayerToUs) --[[************************************************* * Part II: manage events if player joins etc.* *****************************************************]] --add player to Us team if is in ACL on Login function addUsPlayerToTeam(oldacc, account, auto) if (isObjectInACLGroup( "user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Us"))) and (string.find(getPlayerName(source), "-|Us|-"))then setPlayerTeam(source, usteam) outputChatBox("Welcome back " .. getPlayerName(source) .. "#e76a0c to -|Us|-!",source, 231, 106, 12, true) playSoundFrontEnd(source, 1) end if (isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Do"))) then setPlayerTeam(source, doteam) outputChatBox("Welcome back " .. getPlayerName(source) .. "#e76a0c to Donators!",source, 231, 106, 12, true) playSoundFrontEnd(source, 1) end end addEventHandler("onPlayerLogin",root, addUsPlayerToTeam) --check Us player after someone changed his nick function checkIfPlayerIsUsAfterNickchange(oldnick, nick) if (string.find(nick, "-|Us|-")) and not (getPlayerTeam(source) == usteam) then if (isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Us"))) then setPlayerTeam(source,usteam) outputChatBox("Welcome back " .. nick .. "#e76a0c to -|Us|-!",source, 231, 106, 12, true) playSoundFrontEnd(source, 1) else setTimer(checkLoginOrKick, 15000, 1, source) outputChatBox("Please login within 15 secs or you'll be kicked!", source, 255, 0, 0, true) end end end addEventHandler("onPlayerChangeNick", getRootElement(), checkIfPlayerIsUsAfterNickchange) function checkUsPlayerOnJoin() if (string.find(getPlayerName(source),"-|Us|-")) then setTimer(checkLoginOrKick, 60000, 1, source) outputChatBox("Please login within 60 secs or you'll be kicked!", source, 255, 0, 0, true) setTimer(outputChatBox, 50000, 1, "Please login now! You have 10 secs left or you'll get kicked!", source, 255, 0, 0, true) --changenick(source) end end addEventHandler("onPlayerJoin", getRootElement(), checkUsPlayerOnJoin) function checkLoginOrKick(player) if not (getPlayerTeam(player) == usteam) and (string.find(getPlayerName(player),"-|Us-")) then kickPlayer(player, "Player with Us tag not logged in") end end --[[************************************************* * Part III: Us stuff * *****************************************************]] -- banned words, chat color function setPlayerChatColor(message, messageType) if (messageType == 0) then local thePlayer = getPlayerName(source) cancelEvent() if (getPlayerTeam(source) == usteam) then local team = getPlayerTeam(source)
  13. ya, but your going to make your own starting race script then... and trust me, that isn't easy...
  14. I'm not sure if your joking but if your not, it's not Malicious Objects, it might be your Antivirus software or your Firewall software... MTA is not Malicious Objects and this page is part of MTA
  15. ok, got it: --[[***************************************** * * * -|Us|- Teamscript * *-------------------------------------------* * teamscript.lua -- server * * Original by Sniper ** Edited by HyPeX * *********************************************]] local resourceRoot = getResourceRootElement(getThisResource()) --[[************************************************* * Part I: tests, resourcestart * *****************************************************]] local testload local testteam local testacl local usteam local doteam --output load message addEventHandler("onResourceStart", resourceRoot, function () outputChatBox("SCRIPT: -|Us|- & Donator teamscript by HyPeX successfully loaded!") testload = true end) --create Teams addEventHandler("onResourceStart", resourceRoot, function () usteam = createTeam("-|Us|- Members", 2, 134, 183) if (getTeamFromName("-|Us|- Members")) then testteam = true outputChatBox("SCRIPT: -|Us|- Team successfully created!") else outputChatBox("SCRIPT ERROR: -|Us|- Team could not be created!") testteam = false end end) --create Teams addEventHandler("onResourceStart", resourceRoot, function () doteam = createTeam("Donators", 100, 255, 100) if (getTeamFromName("Donators")) then testteam = true outputChatBox("SCRIPT: Donator Team successfully created!") else outputChatBox("SCRIPT ERROR: Donator Team could not be created!") testteam = false end end) --build the "Us" group in ACL addEventHandler("onResourceStart", resourceRoot, function () if (aclGetGroup("Us") == nil) or (aclGetGroup("Us") == false) then outputChatBox("SCRIPT: Creating Us group in ACL...") aclCreateGroup("Us") else outputChatBox("SCRIPT: Group -|Us|- is already added in ACL") end end) --build the "Do" group in ACL addEventHandler("onResourceStart", resourceRoot, function () if (aclGetGroup("Do") == nil) or (aclGetGroup("Do") == false) then outputChatBox("SCRIPT: Creating Do group in ACL...") aclCreateGroup("Do") else outputChatBox("SCRIPT: Group Donators is already added in ACL") end end) --check if THIS resource is added in ACL else output warning addEventHandler("onResourceStart", resourceRoot, function () if not (isObjectInACLGroup("resource." ..getResourceName(getThisResource()), aclGetGroup("Admin"))) then outputChatBox("SCRIPT ERROR: Please add this resource (teamscript) as 'resource.' into the ACL Group 'Admin' else this script won't work!") outputDebugString("SCRIPT ERROR: Please add this resource (teamscript) as 'resource.' into the ACL Group 'Admin' else this script won't work!", 1, 255, 0, 0) testacl = false else testacl = true end end) --[[************************************************* * Part II: manage players * *****************************************************]] --command for adding a player to Us Group function addPlayerToUs(playerSource, commandName, accountName) if (isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(playerSource)), aclGetGroup("Admin"))) then if (accountName) then if (getAccount(accountName)) then aclGroupAddObject (aclGetGroup("Us"), "user."..accountName) outputChatBox("Account '"..accountName.."#00ff00' succesfully added to the Us ACL group", playerSource, 0, 255, 0, true) if (getAccount(accountName)) then setPlayerTeam(getAccountPlayer(getAccount(accountName)), usteam) end --else --outputChatBox("Account could not be found! Please enter the correct accountname!", playerSource, 255, 0, 0, true) end --forgot this end else outputChatBox ("No account name specified.", playerSource, 255, 0, 0, true) outputChatBox ("Syntax: /addus [accountName]", playerSource, 255, 0, 0, true) end else outputChatBox ("Sorry but only admins can use this!", playerSource, 255, 0, 0, true) end end addCommandHandler("addus", addPlayerToUs) --command for adding a player to Do Group function addPlayerToDo (playerSource, commandName, accountName) if (isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(playerSource)), aclGetGroup("Admin"))) then if (accountName) then --if (getAccount(accountName)) then aclGroupAddObject (aclGetGroup("Do"), "user."..accountName) outputChatBox("Account '"..accountName.."#00ff00' succesfully added to the Do ACL group", playerSource, 0, 255, 0, true) if (getAccount(accountName)) then setPlayerTeam(getAccountPlayer(getAccount(accountName)), doteam) end --else --outputChatBox("Account could not be found! Please enter the correct accountname!", playerSource, 255, 0, 0, true) --end else outputChatBox ("No account name specified.", playerSource, 255, 0, 0, true) outputChatBox ("Syntax: /adddo [accountName]", playerSource, 255, 0, 0, true) end else outputChatBox ("Sorry but only admins can use this!", playerSource, 255, 0, 0, true) end end addCommandHandler("adddo", addPlayerToDo) --command for removing a player from the Us Group function removePlayerFromUs (playerSource, commandName, accountName) if (isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(playerSource)), aclGetGroup("Admin"))) then if (accountName) then --if (getAccount(accountName)) then if (isObjectInACLGroup("user." ..accountName, aclGetGroup("Us"))) then aclGroupRemoveObject (aclGetGroup("Us"), "user."..accountName) outputChatBox("Account '"..accountName.."#00ff00' succesfully removed from the Us ACL group", playerSource, 0, 255, 0, true) else outputChatBox("Account could not be found in ACL to delete!", playerSource, 255, 0, 0, true) end --else --outputChatBox("Account could not be found! Please enter the correct accountname!", playerSource, 255, 0, 0, true) --end else outputChatBox ("No account name specified.", playerSource, 255, 0, 0, true) outputChatBox ("Syntax: /addus [accountName]", playerSource, 255, 0, 0, true) end else outputChatBox ("Sorry but only admins can use this!", playerSource, 255, 0, 0, true) end end addCommandHandler("removeus", removePlayerFromUs) --command for adding moderators function addPlayerToUs (playerSource, commandName, accountName) if (isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(playerSource)), aclGetGroup("Admin"))) then if (accountName) then if (getAccount(accountName)) then aclGroupAddObject (aclGetGroup("Moderator"), "user."..accountName) outputChatBox("Account '"..accountName.."#00ff00' succesfully added to the Moderator group", playerSource, 0, 255, 0, true) else outputChatBox("Account could not be found! Please enter the correct accountname!", playerSource, 255, 0, 0, true) end else outputChatBox ("No account name specified.", playerSource, 255, 0, 0, true) outputChatBox ("Syntax: /addmod [accountName]", playerSource, 255, 0, 0, true) end else outputChatBox ("Sorry but only admins can use this!", playerSource, 255, 0, 0, true) end end addCommandHandler("addmod", addPlayerToUs) --command for adding supermoderators function addPlayerToUs (playerSource, commandName, accountName) if (isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(playerSource)), aclGetGroup("Admin"))) then if (accountName) then if (getAccount(accountName)) then aclGroupAddObject (aclGetGroup("SuperModerator"), "user."..accountName) outputChatBox("Account '"..accountName.."#00ff00' succesfully added to the SuperModerator group", playerSource, 0, 255, 0, true) else outputChatBox("Account could not be found! Please enter the correct accountname!", playerSource, 255, 0, 0, true) end else outputChatBox ("No account name specified.", playerSource, 255, 0, 0, true) outputChatBox ("Syntax: /addsmod [accountName]", playerSource, 255, 0, 0, true) end else outputChatBox ("Sorry but only admins can use this!", playerSource, 255, 0, 0, true) end end addCommandHandler("addsmod", addPlayerToUs) --[[************************************************* * Part II: manage events if player joins etc.* *****************************************************]] --add player to Us team if is in ACL on Login function addUsPlayerToTeam(oldacc, account, auto) if (isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Us"))) and (string.find(getPlayerName(source), "-|Us|-"))then setPlayerTeam(source, usteam) outputChatBox("Welcome back " .. getPlayerName(source) .. "#e76a0c to -|Us|-!",source, 231, 106, 12, true) playSoundFrontEnd(source, 1) end end addEventHandler("onPlayerLogin", getRootElement(), addUsPlayerToTeam) --add player to donator team if is in ACL on Login function addUsPlayerToTeam(oldacc, account, auto) if (isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Do"))) then setPlayerTeam(source, doteam) outputChatBox("Welcome back " .. getPlayerName(source) .. "#e76a0c to Donators!",source, 231, 106, 12, true) playSoundFrontEnd(source, 1) end end addEventHandler("onPlayerLogin", getRootElement(), addUsPlayerToTeam) --check Us player after someone changed his nick function checkIfPlayerIsUsAfterNickchange(oldnick, nick) if (string.find(nick, "-|Us|-")) and not (getPlayerTeam(source) == usteam) then if (isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Us"))) then setPlayerTeam(source,usteam) outputChatBox("Welcome back " .. nick .. "#e76a0c to -|Us|-!",source, 231, 106, 12, true) playSoundFrontEnd(source, 1) else setTimer(checkLoginOrKick, 150000, 1, source) outputChatBox("Please login within 15 secs or you'll be kicked!", source, 255, 0, 0, true) end end end addEventHandler("onPlayerChangeNick", getRootElement(), checkIfPlayerIsUsAfterNickchange) function checkUsPlayerOnJoin() if (string.find(getPlayerName(source),"-|Us|-")) then setTimer(checkLoginOrKick, 60000, 1, source) outputChatBox("Please login within 60 secs or you'll be kicked!", source, 255, 0, 0, true) --setTimer(outputChatBox, 10000, 1, "Please login now! You have 10 secs left or you'll get kicked!", source, 255, 0, 0, true) --changenick(source) end end addEventHandler("onPlayerJoin", getRootElement(), checkUsPlayerOnJoin) function checkLoginOrKick(player) if not (
  16. oh, you want to start a race when the countdown is finish, if you want to use the race gamemode then try this, Server: local racemarker = createMarker(-2663.51,610,13.3,"cylinder",20,0,255,0,100) local playersReady = 0 local allPlayes = 0 function start(hitElement) for i,v in ipairs(getElementsByType("player"))do allPlayes = allPlayes + 1 end playersReady = playersReady + 1 if(playersReady == allPlayers)then triggerClientEvent("startcountdown",root) startResource(getResourceFromName("race")) end if not isPedInVehicle(hitElement) then return end local vehicle = getPedOccupiedVehicle(hitElement) setElementFrozen(vehicle,true) setTimer(setElementFrozen,10000,1,vehicle,false) end addEventHandler("onMarkerHit",racemarker,start)
  17. Jaysds1

    Xampp

    ok, Can you post a screenshot of your Xampp and the browser of you trying to go into http://localhost
  18. Go into the marker then it checks how many people are on, if there's only one person on then it should automatically start... BTW, are you using the Race Gamemode?
  19. so, wait, What happened to the May 29th event thing? Argonath RPG isn't hosting it anymore?
  20. try this: Server: local racemarker = createMarker(-2663.51,610,13.3,"cylinder",20,0,255,0,100) local playersReady = 0 local allPlayes = 0 function start(hitElement) for i,v in ipairs(getElementsByType("player"))do allPlayes = allPlayes + 1 end playersReady = playersReady + 1 if(playersReady == allPlayers)then triggerClientEvent("startcountdown",root) end if not isPedInVehicle(hitElement) then return end local vehicle = getPedOccupiedVehicle(hitElement) setElementFrozen(vehicle,true) setTimer(setElementFrozen,10000,1,vehicle,false) end addEventHandler("onMarkerHit",racemarker,start)
  21. Sorry, kaos057, It's not possible, If it was possible, then MTA would've implanted it when 1.1 came in, but it's not possible to create an object in to a game that already has objects loaded... think of it this way, You burned a cd then try to add songs later on, but can't....
  22. Well, the crash seems to be coming from your gta, Can you move the mods to another folder out of the GTA then try MTA again please?
  23. Sorry, but I can't see the image, can you upload the image on another image hosting site, or upload at my fav hosting site: http://www.imgur.com
  24. Here: https://wiki.multitheftauto.com/wiki/Archive
×
×
  • Create New...