Jump to content

steadyfi

Members
  • Posts

    144
  • Joined

  • Last visited

Everything posted by steadyfi

  1. Hello, i've got a little problem with my script. I use this script to create a team when it starts and set the Admins to that group when they login. But i get an error every time, it says that it cannot find global variable getAccountName and getPlayerAccount Script: Server-Side --Create teams on resource start function createTeams(source, teamName) staff = createTeam("GameCentral //Admins", 102, 0, 0) end addEventHandler("onResourceStart", getRootElement(), createTeams) --Set Admin team function setAdminTeam(source) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then setPlayerTeam(source, staff) local r,g,b = getPlayerNametagColor(source) local name = getPlayerName(source) outputChatBox("#00FF00Greetings: "..name, getRootElement(), r, g, b, true) end end addEventHandler("onPlayerLogin", getRootElement(), setAdminTeam) Error: [2014-11-19 21:10:43] WARNING: [race]\[mods]\gc_basic\modules\teams.lua:9: Bad argument @ 'getPlayerAccount' [Expected element at argument 1] [2014-11-19 21:10:43] WARNING: [race]\[mods]\gc_basic\modules\teams.lua:9: Bad argument @ 'getAccountName' [Expected account at argument 1, got boolean] [2014-11-19 21:10:43] ERROR: [race]\[mods]\gc_basic\modules\teams.lua:9: attempt to concatenate a boolean value Thanks
  2. Tab is set to fire. Go to Settings>Binds and see Action: Tab, unbind it. And what do you mean by ? You mean you can't shoot at 2 bullets left ?
  3. Thank you very very much ! I really appreciate it. Next time I will try to solve it by my self. Thanks again
  4. I'm officially retarted and I should quit. I'm staying here... for 2 hours or more.... trying to figure out how to make it work... It returnes nil and gives me an error when trying to fetch serial in the server side script. I didn't think I will ever ask for this but... could you please make it for me ? I'm never gonna make it work. If you don't wanna help me with that it's alright, you aren't obligated to help me by doing my work. Client Side: isVisible = false function createGui() mainWnd = guiCreateWindow(650, 350, 283, 410, "Player Manager", false) tabPanel = guiCreateTabPanel(0, 0.1, 1, 1, true, mainWnd) guiSetVisible(mainWnd, true) guiWindowSetSizable(mainWnd, false) showCursor(true) tabAcc = guiCreateTab("Accounts", tabPanel) accountGrid = guiCreateGridList(9, 23, 249, 260, false, tabAcc) guiGridListSetSelectionMode(accountGrid, 2) refreshButton = guiCreateButton(9, 300, 80, 26, "Refresh", false, tabAcc) deleteButton = guiCreateButton(178, 300, 80, 26, "Delete", false, tabAcc) guiGridListAddColumn(accountGrid, "Account Name", 0.91) triggerServerEvent("serverGetAccounts", localPlayer, localPlayer) tabSerial = guiCreateTab("Serials", tabPanel) playerGrid = guiCreateGridList(9, 23, 249, 228, false, tabSerial) guiGridListSetSelectionMode(playerGrid, 2) refreshButton = guiCreateButton(9, 258, 80, 26, "Refresh", false, tabSerial) fetchButton = guiCreateButton(178, 258, 80, 26, "Fetch", false, tabSerial) guiGridListAddColumn(playerGrid, "Nickname", 0.91) editUser = guiCreateEdit(5, 300, 255, 30, "", false, tabSerial) guiEditSetReadOnly(editUser, true) triggerServerEvent("serverGetPlayers", localPlayer, localPlayer) end function handleCommand() if (isVisible == false) then isVisible = true createGui() elseif (isVisible == true) then guiSetVisible(mainWnd, false) showCursor(false) isVisible = false end end addCommandHandler("plr", handleCommand) --------------------------------- -- Account manager --------------------------------- function refreshGridlist(accountTable) guiGridListClear(accountGrid) for index, account in ipairs(accountTable) do local row = guiGridListAddRow(accountGrid) guiGridListSetItemText(accountGrid, row, 1, tostring(account), false, false) end end addEvent("serverGivesAccounts", true) addEventHandler("serverGivesAccounts", getRootElement(), refreshGridlist) function buttonHandler() if (source == refreshButton) then triggerServerEvent("serverGetAccounts", localPlayer, localPlayer) elseif (source == deleteButton) then local row,col = guiGridListGetSelectedItem(accountGrid) if row and col and row ~= -1 and col ~= -1 then local targetAccount = guiGridListGetItemText(accountGrid, row, 1) triggerServerEvent("requestAccountDelete", localPlayer, targetAccount) triggerServerEvent("serverGetAccounts", localPlayer, localPlayer) end end end addEventHandler("onClientGUIClick", getResourceRootElement(getThisResource()), buttonHandler) --------------------------------- -- Serial Manager --------------------------------- function refreshGridlist2(onlinePlayers) guiGridListClear(playerGrid) for players in ipairs(onlinePlayers) do local row = guiGridListAddRow(playerGrid) guiGridListSetItemText(playerGrid, row, 1, tostring(player), false, false) end end addEvent("serverGivesPlayers", true) addEventHandler("serverGivesPlayers", getRootElement(), refreshGridlist2) function findPlayerByUserDataString(targetPlayer) local players = getElementsByType("player") for i=1,#players do local player = players[i] if targetPlayer == tostring(player) then return player end end return false end function buttonHandler2(targetPlayer) if (source == refreshButton) then triggerServerEvent("serverGetPlayers", localPlayer, localPlayer) end if (source == fetchButton) then local row,col = guiGridListGetSelectedItem(playerGrid) if row and col and row ~= -1 and col ~= -1 then local targetPlayer = guiGridListGetItemText(playerGrid, row, 1) local player = findPlayerByUserDataString(targetPlayer) triggerServerEvent("requestGetSerial", localPlayer, targetPlayer) end end end addEventHandler("onClientGUIClick", getResourceRootElement(getThisResource()), buttonHandler2) function fillSerial(serial) guiSetText(editUser, serial) end addEvent("fillForm", true) addEventHandler("fillForm", getRootElement(), fillSerial) Server Side: --------------------------------- -- Account manager --------------------------------- function getTheAccounts(client) accountTable = getAccounts() local tempTable = {} if(#accountTable == 0)then outputDebugString("No accounts in database!") else for index, account in pairs(accountTable) do table.insert(tempTable, getAccountName(account)) end triggerClientEvent(client, "serverGivesAccounts", client, tempTable) end end addEvent("serverGetAccounts", true) addEventHandler("serverGetAccounts", getRootElement(), getTheAccounts) function deleteAccount(targetAccount) if getAccount(targetAccount) then removeAccount(getAccount(targetAccount)) outputChatBox("The account "..targetAccount.." has been deleted.") end end addEvent("requestAccountDelete", true) addEventHandler("requestAccountDelete", getRootElement(), deleteAccount) --------------------------------- -- Serial Manager --------------------------------- function getThePlayers(client) local onlinePlayers = {} for i,v in pairs(getElementsByType("player")) do table.insert(onlinePlayers, v) end if(#onlinePlayers == 0)then outputDebugString("No player on the server !") else triggerClientEvent(client, "serverGivesPlayers", client, onlinePlayers) end end addEvent("serverGetPlayers", true) addEventHandler("serverGetPlayers", getRootElement(), getThePlayers) function getSerial(targetPlayer) serial = getPlayerSerial(targetPlayer) triggerClientEvent("fillForm", serial) end addEvent("requestGetSerial", true) addEventHandler("requestGetSerial", getRootElement(), getSerial) Screenshot: (error + nil) Thanks for all your help, I really appreciate it ! I'm just a noob when it comes to tables and inserting tables into grids...
  5. I think i'm close ... but not really close. It returns false. What did I do wrong ? Sorry if i'm being silly or a noob ... or both. Client Side: isVisible = false function createGui() mainWnd = guiCreateWindow(650, 350, 283, 410, "Player Manager", false) tabPanel = guiCreateTabPanel(0, 0.1, 1, 1, true, mainWnd) guiSetVisible(mainWnd, true) showCursor(true) tabAcc = guiCreateTab("Accounts", tabPanel) accountGrid = guiCreateGridList(9, 23, 249, 228, false, tabAcc) guiGridListSetSelectionMode(accountGrid, 2) refreshButton = guiCreateButton(9, 258, 80, 26, "Refresh", false, tabAcc) deleteButton = guiCreateButton(110, 258, 80, 26, "Delete", false, tabAcc) closeButton = guiCreateButton(228, 258, 26, 26, "X", false, tabAcc) guiGridListAddColumn(accountGrid, "Account Name", 0.91) triggerServerEvent("serverGetAccounts", localPlayer, localPlayer) tabSerial = guiCreateTab("Serials", tabPanel) playerGrid = guiCreateGridList(9, 23, 249, 228, false, tabSerial) guiGridListSetSelectionMode(playerGrid, 2) refreshButton = guiCreateButton(9, 258, 80, 26, "Refresh", false, tabSerial) fetchButton = guiCreateButton(110, 258, 80, 26, "Fetch", false, tabSerial) closeButton = guiCreateButton(228, 258, 26, 26, "X", false, tabSerial) guiGridListAddColumn(playerGrid, "Nickname", 0.91) editUser = guiCreateEdit(5, 300, 255, 30, "", false, tabSerial) triggerServerEvent("serverGetPlayers", localPlayer, localPlayer) end function handleCommand() if (isVisible == false) then isVisible = true createGui() elseif (isVisible == true) then guiSetVisible(mainWnd, false) showCursor(false) isVisible = false end end addCommandHandler("plr", handleCommand) --------------------------------- -- Account manager --------------------------------- function refreshGridlist(accountTable) guiGridListClear(accountGrid) for index, account in ipairs(accountTable) do local row = guiGridListAddRow(accountGrid) guiGridListSetItemText(accountGrid, row, 1, tostring(account), false, false) end end addEvent("serverGivesAccounts", true) addEventHandler("serverGivesAccounts", getRootElement(), refreshGridlist) function buttonHandler() if (source == refreshButton) then triggerServerEvent("serverGetAccounts", localPlayer, localPlayer) elseif (source == deleteButton) then local row,col = guiGridListGetSelectedItem(accountGrid) if row and col and row ~= -1 and col ~= -1 then local targetAccount = guiGridListGetItemText(accountGrid, row, 1) triggerServerEvent("requestAccountDelete", localPlayer, targetAccount) triggerServerEvent("serverGetAccounts", localPlayer, localPlayer) end end if (source == closeButton) then guiSetVisible(mainWnd, false) showCursor(false) end end addEventHandler("onClientGUIClick", getResourceRootElement(getThisResource()), buttonHandler) --------------------------------- -- Serial Manager --------------------------------- function refreshGridlist2(onlinePlayers) guiGridListClear(playerGrid) for player in ipairs(onlinePlayers) do local playerName = findPlayerByUserDataString(targetPlayer) local row = guiGridListAddRow(playerGrid) guiGridListSetItemText(playerGrid, row, 1, tostring(playerName), false, false) end end addEvent("serverGivesPlayers", true) addEventHandler("serverGivesPlayers", getRootElement(), refreshGridlist2) function findPlayerByUserDataString(targetPlayer) local players = getElementsByType("player") for i=1,#players do local player = players[i] if targetPlayer == tostring(player) then return player end end return false end function buttonHandler2() if (source == refreshButton) then triggerServerEvent("serverGetPlayers", localPlayer, localPlayer) end if (source == fetchButton) then local row,col = guiGridListGetSelectedItem(playerGrid) if row and col and row ~= -1 and col ~= -1 then local targetPlayer = guiGridListGetItemText(playerGrid, row, 1) triggerServerEvent("requestGetSerial", localPlayer, targetPlayer) end end if (source == closeButton) then guiSetVisible(mainWnd, false) showCursor(false) end end addEventHandler("onClientGUIClick", getResourceRootElement(getThisResource()), buttonHandler2) function serialReceived(serial) editUser = serial end addEvent("fillForm", true) addEventHandler("fillForm", getRootElement(), serialReceived) Server Side: --------------------------------- -- Account manager --------------------------------- function getTheAccounts(client) accountTable = getAccounts() local tempTable = {} if(#accountTable == 0)then outputDebugString("No accounts in database!") else for index, account in pairs(accountTable) do table.insert(tempTable, getAccountName(account)) end triggerClientEvent(client, "serverGivesAccounts", client, tempTable) end end addEvent("serverGetAccounts", true) addEventHandler("serverGetAccounts", getRootElement(), getTheAccounts) function deleteAccount(targetAccount) if getAccount(targetAccount) then removeAccount(getAccount(targetAccount)) outputChatBox("The account "..targetAccount.." has been deleted.") end end addEvent("requestAccountDelete", true) addEventHandler("requestAccountDelete", getRootElement(), deleteAccount) --------------------------------- -- Serial Manager --------------------------------- function getThePlayers(client) local onlinePlayers = {} for i,v in pairs(getElementsByType("player")) do table.insert(onlinePlayers, v) end if(#onlinePlayers == 0)then outputDebugString("No player on the server !") else triggerClientEvent(client, "serverGivesPlayers", client, onlinePlayers) end end addEvent("serverGetPlayers", true) addEventHandler("serverGetPlayers", getRootElement(), getThePlayers) function getSerial(targetPlayer) serial = getPlayerSerial(targetPlayer) triggerClientEvent("fillForm", serial) end addEvent("requestGetSerial", true) addEventHandler("requestGetSerial", getRootElement(), getSerial) Screenshot:
  6. Thanks , i'll try to modify the code to fit this.
  7. Hello , i've got a problem with a script. I want to get all the online players and put them in a table onlinePlayers but it returns userdata: 00000068. I'm using this script to see the serial of a player. Ignore the part with the account manager , it's working. Client-Side: isVisible = false function createGui() mainWnd = guiCreateWindow(650, 350, 283, 410, "Player Manager", false) tabPanel = guiCreateTabPanel(0, 0.1, 1, 1, true, mainWnd) guiSetVisible(mainWnd, true) showCursor(true) tabAcc = guiCreateTab("Accounts", tabPanel) accountGrid = guiCreateGridList(9, 23, 249, 228, false, tabAcc) guiGridListSetSelectionMode(accountGrid, 2) refreshButton = guiCreateButton(9, 258, 80, 26, "Refresh", false, tabAcc) deleteButton = guiCreateButton(110, 258, 80, 26, "Delete", false, tabAcc) closeButton = guiCreateButton(228, 258, 26, 26, "X", false, tabAcc) guiGridListAddColumn(accountGrid, "Account Name", 0.91) triggerServerEvent("serverGetAccounts", localPlayer, localPlayer) tabSerial = guiCreateTab("Serials", tabPanel) playerGrid = guiCreateGridList(9, 23, 249, 228, false, tabSerial) guiGridListSetSelectionMode(playerGrid, 2) refreshButton = guiCreateButton(9, 258, 80, 26, "Refresh", false, tabSerial) fetchButton = guiCreateButton(110, 258, 80, 26, "Fetch", false, tabSerial) closeButton = guiCreateButton(228, 258, 26, 26, "X", false, tabSerial) guiGridListAddColumn(playerGrid, "Name", 0.91) editUser = guiCreateEdit(5, 300, 255, 30, "", false, tabSerial) triggerServerEvent("serverGetPlayers", localPlayer, localPlayer) end function handleCommand() --if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then if (isVisible == false) then isVisible = true createGui() elseif (isVisible == true) then guiSetVisible(mainWnd, false) showCursor(false) isVisible = false end --end end addCommandHandler("plr", handleCommand) --------------------------------- -- Account manager --------------------------------- function refreshGridlist(accountTable) guiGridListClear(accountGrid) for index, account in ipairs(accountTable) do local row = guiGridListAddRow(accountGrid) guiGridListSetItemText(accountGrid, row, 1, tostring(account), false, false) end end addEvent("serverGivesAccounts", true) addEventHandler("serverGivesAccounts", getRootElement(), refreshGridlist) function buttonHandler() if (source == refreshButton) then triggerServerEvent("serverGetAccounts", localPlayer, localPlayer) elseif (source == deleteButton) then local row,col = guiGridListGetSelectedItem(accountGrid) if row and col and row ~= -1 and col ~= -1 then local targetAccount = guiGridListGetItemText(accountGrid, row, 1) triggerServerEvent("requestAccountDelete", localPlayer, targetAccount) triggerServerEvent("serverGetAccounts", localPlayer, localPlayer) end end if (source == closeButton) then guiSetVisible(mainWnd, false) showCursor(false) end end addEventHandler("onClientGUIClick", getResourceRootElement(getThisResource()), buttonHandler) --------------------------------- -- Serial Manager --------------------------------- function refreshGridlist2(onlinePlayers) guiGridListClear(playerGrid) for player in ipairs(onlinePlayers) do local row = guiGridListAddRow(playerGrid) guiGridListSetItemText(playerGrid, row, 1, tostring(player), false, false) end end addEvent("serverGivesPlayers", true) addEventHandler("serverGivesPlayers", getRootElement(), refreshGridlist2) function buttonHandler2() if (source == refreshButton) then triggerServerEvent("serverGetPlayers", localPlayer, localPlayer) end if (source == fetchButton) then local row,col = guiGridListGetSelectedItem(playerGrid) if row and col and row ~= -1 and col ~= -1 then local targetPlayer = guiGridListGetItemText(playerGrid, row, 1) triggerServerEvent("requestGetSerial", localPlayer, targetPlayer) end end if (source == closeButton) then guiSetVisible(mainWnd, false) showCursor(false) end end addEventHandler("onClientGUIClick", getResourceRootElement(getThisResource()), buttonHandler2) function serialReceived(serial) editUser = serial end addEvent("fillForm", true) addEventHandler("fillForm", getRootElement(), serialReceived) Server-Side: --------------------------------- -- Account manager --------------------------------- function getTheAccounts(client) accountTable = getAccounts() local tempTable = {} if(#accountTable == 0)then outputDebugString("No accounts in database!") else for index, account in pairs(accountTable) do table.insert(tempTable, getAccountName(account)) end triggerClientEvent(client, "serverGivesAccounts", client, tempTable) end end addEvent("serverGetAccounts", true) addEventHandler("serverGetAccounts", getRootElement(), getTheAccounts) function deleteAccount(targetAccount) if getAccount(targetAccount) then removeAccount(getAccount(targetAccount)) outputChatBox("The account "..targetAccount.." has been deleted.") end end addEvent("requestAccountDelete", true) addEventHandler("requestAccountDelete", getRootElement(), deleteAccount) --------------------------------- -- Serial Manager --------------------------------- function getThePlayers(client) local onlinePlayers = {} for i,v in pairs(getElementsByType("player")) do table.insert(onlinePlayers, v) end if(#onlinePlayers == 0)then outputDebugString("No player on the server !") else triggerClientEvent(client, "serverGivesPlayers", client, onlinePlayers) end end addEvent("serverGetPlayers", true) addEventHandler("serverGetPlayers", getRootElement(), getThePlayers) function getSerial(targetPlayer) serial = getPlayerSerial(targetPlayer) triggerClientEvent("fillForm", serial) end addEvent("requestGetSerial", true) addEventHandler("requestGetSerial", getRootElement(), getSerial) Error: (in case you need it) [2014-11-16 23:38:36] WARNING: [race]\[mods]\gc_accmanager\server.lua:47: Bad argument @ 'getPlayerSerial' [Expected player at argument 1, got string 'userdata: 00000068'] [2014-11-16 23:38:36] WARNING: [race]\[mods]\gc_accmanager\server.lua:48: Bad argument @ 'triggerClientEvent' [Expected element at argument 2, got boolean] Thanks
  8. You could try to use onClientPlayerWeaponFire handler and see how it works , i'm gonna give you 2 scripts and you-ll see what's better. onClientPlayerWeaponFire triggers the function every time the player shoots so its better in this situation. #1 Uses toggleControl function dontTakeMyGun() --the function local currentammo = getPedTotalAmmo(getLocalPlayer()) --set the variable "currentammo" if (currentammo < 2) then --if ammo <2 then do toggleControl ("fire", false ) --toggle bind end end addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), dontTakeMyGun) --Triggers the function every time the peds fire #2 Uses cancelEvent (see the comment on it to see what it means) function dontTakeMyGun() --the function local currentammo = getPedTotalAmmo(getLocalPlayer()) --set the variable "currentammo" if (currentammo < 2) then --if ammo <2 then do cancelEvent(true) --cancels the event which in this case is onClientPlayerWeaponFire so you can't shoot end end addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), dontTakeMyGun) --Triggers the function every time the peds fire
  9. I told the same thing. Sorry if this is counted as spam. I just told multi-code You send it color coded but getPlayerName does not include color codes from the players name. Sorry if I didn't explain myself right.
  10. After a 2 min research on the wiki on the topic outputChatBox I found how to make the name color coded. I was a idiot , sorry. --Create teams on resource start function createTeams(source, teamName) staff = createTeam("Admins", 102, 0, 0) end addEventHandler("onResourceStart", getRootElement(), createTeams) --Set Admin team function setAdminTeam(thePlayer) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then setPlayerTeam(source, staff) local r,g,b = getPlayerNametagColor ( source ) --get the player's nametag colour local name = getPlayerName ( source ) --get his name outputChatBox("#00FF00Greetings: "..name, getRootElement(), r, g, b, true) end end addEventHandler("onPlayerLogin", getRootElement(), setAdminTeam) #Solved
  11. I mean how do I make it work with name color codes. If a player has a color code show it, but I think it isn't possible. Anyway, I got my answer and I replaced ..name.. with ..getPlayerName(source)... This is the code if anyone needs it: --Create teams on resource start function createTeams(source, teamName) --function staff = createTeam("Admin", 128, 0, 0) --create team end addEventHandler("onResourceStart", getRootElement(), createTeams) --Event triggers createTeams function when the Resource Starts and creates the team --Set admins from ACL to Admin team after logging in function setAdminTeam(thePlayer) --function if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then --check if admin setPlayerTeam(source, staff) --set team outputChatBox("Greetings "..getPlayerName(source).." !", getRootElement(), 0, 255, 0) --greetings (will show player name with color code ex: #000000Test , I can't make it handle color codes) end end addEventHandler("onPlayerLogin", getRootElement(), setAdminTeam) --event handler so when a player joins ACL gives him Admin rights if account is added in admin group and triggers function
  12. i've open that script and i cant find the variable to add loot position/coordinate , then i find it on editor_server.lua it has many coordinate like residential item , army item etc . then if i add cordinate to it , it would be?? i will try it soon The DayZ gamemode uses those classes to specify what kind of loot to spawn where. You just add new coordonates to any of the classes Army,Residential,Etc and then test. Tell me if i'm wrong. BTW, Make a save copy of the file you are editing or add a comment at the end of the line you are adding to know how to remove in case you do something wrong. Sorry if this is bumping up a old topic, I'm new here.
  13. I think I got it. It means I gotta use the getPlayerName(source) inside the outputChatBox and not use it as a local variable, right ? Edit: It worked , thanks ! But how do I make it work with color codes ?
  14. Hi , i've got a little problem with my set teams script. I use this script to set the team for admins to Admins when they join. I try to use outputChatBox to say hello when a admin joins but I get a error. Script: (server side) --Create teams on resource start function createTeams(source, teamName) staff = createTeam("Admins", 128, 0, 0) end addEventHandler("onResourceStart", getRootElement(), createTeams) --Set admins from ACL to Admin team after logging in function setAdminTeam(thePlayer) local name = getPlayerName(thePlayer) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then --check if admin setPlayerTeam(source, staff) --set team outputChatBox("Greetings "..name.." ! Welcome back.", getRootElement(), 0, 255, 0) --greetings end end addEventHandler("onPlayerLogin", getRootElement(), setAdminTeam) Error: [2014-11-10 22:39:46] WARNING: [race]\[mods]\gc_players\teams.lua:9: Bad argument @ 'getPlayerName' [Expected element at argument 1] [2014-11-10 22:39:46] ERROR: [race]\[mods]\gc_players\teams.lua:12: attempt to concatenate local 'name' (a boolean value) Thanks.
  15. Ok, one more kid selling stolen scripts and free licensed ones... Here are the authors of the scripts: Race: arc_ Userpanel: Xiti and RoX Classic excuse ... don't you think this sentence is getting old and overused ? joao1234: "John , do you remember those stolen scripts I posted yesterday ? Yea ... go change your name to Xiti and send me some messages as proof I didn't stole the scripts !" I like how I see a lot of people with screenshots of skype where "Xiti" is saying that you can sell his scripts. If you bring me one photo with proof of Skype ID + Messages I will trust you that you have permission to sell them. You can just tell a friend to send you those messages and change his name or nickname him from your Skype client. Who the f*** would pay 20 motherducker euros for a free resources with some modified images ? You do not have permission to sell a free gamemode just because you modified the position of Time Remaining and Time Elapsed, everyone can do that in less than 10 minutes. The Race resource belongs to arc_ and it's given with every Mta Server installation and you can also find the latest updated resources including Race by arc_ at the mta sa mirror page and you can modify them by your likeings. The scoreboard and toptimes are really nice but I've seen a few at others too so they are probably stolen too but hey , they look good so congratz that you found them. At the end you shouldn't sell those.
  16. I've managed to make the cancelEvent if vehicle is locked and player wants to exit but ... one more problem ... Look at this: function playerForcedExit(thePlayer) local playerVehicle = getPedOccupiedVehicle(thePlayer) if playerVehicle then local vehicleType = getVehicleType(playerVehicle) if isVehicleLockable(playerVehicle) == true then local lockedState = isVehicleLocked(playerVehicle) if lockedState == true then setVehicleLocked(playerVehicle,not lockedState) end end end end addEventHandler ( "onPlayerWasted", getRootElement(), playerForcedExit ) addEventHandler ( "onPlayerQuit", getRootElement(), playerForcedExit ) I tried to unlock the car if player quits or dies but it checks for the vehicle after the event happes (onPlayerQuit or onPlayerWasted) and he isn't anymore in the vehicle.
  17. Thanks ! I'll try it when i start my Pc but from what i've seen so far from the photos it has a spawn funtion ... i think i'll remove the vehicle spawn function and only let the lock part.
  18. Hello , can someone help me with a car lock system ? I've tried some but they check for veh owner or when you get out of the vehicle and is locked it bugs and you can't get back in. I want something for a DayZ server with what you can only lock the vehicle if you are in it and use the cancleEvent() function to cancel the onPlayerVehicleExit event if locked so you can't get out of it if its locked ! I tried to modify more scripts and put them together but didn't work. I would apreciate if you already have a script and write it. Thanks.
  19. Hello ! I'm SWYTeaXSG and today ill show you how to make a basic gate script. If you have problems or fixes to it please leave you script in the comments ! local gate = createObject(id,x,y,z, 0, 0, rotation ) function open() moveObject(gate, milisec, z,y,z, 0, 0, rotation ) end addCommandHandler("open (password)", open) function close() moveObject(gate, milisec, z,y,z, 0, 0, rotation ) end addCommandHandler("close (password)", close) I hope it helped ! I only want to help people to make a base on a server !
×
×
  • Create New...