-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
edit the acl.xml add all what u want then DONT RESTART ANY RESOURCE/STOP then go admin panel tab "resources" and u will see there is a edit box that says "execute command" in the box u type aclReload() and click button "server" and is done
-
lol why restart? there is a way from admin panel executing a command that dont needs to restart
-
add that. "Snake" is the account name so will be like " u can add as many u want of course. and btw m4rsj, he asked for somthing that detects members not teams
-
check this is like u wanted, local root = getRootElement() addEventHandler("onResourceStart", root, function() team = createTeam ("Z.A.R.S.", 0, 0, 255) end ) function login() local taccount = getPlayerAccount ( source ) if isZarAccount(taccount) then setPlayerTeam ( source, team) outputChatBox ("Welcome to Zombie Apocalypse Rescue Squad HQ", source) spawnPlayer (source, -2246.7751464844, 2283.3193359375, 5, 90, math.random(0,264), team ) fadeCamera (source, true) setCameraTarget (source, true) else end end addEventHandler("onPlayerLogin", root,login) function isZarAccount(account) local nick = "" local group = aclGetGroup("[Z.A.R.S]") if (account and group) then nick = string.lower(getAccountName(account) or "") for _, object in ipairs(aclGroupListObjects(group) or {}) do if (gettok(object, 1, string.byte('.')) == "user") then if (nick == string.lower(gettok(object, 2, string.byte('.')))) then return true end end end end return false end actually checks if u in the acl group called "[Z.A.R.S]" if u are u will spawn etc and if u arent u wont spawn.
-
How exactly u want to detect? by somthing in the players account? or?
-
Hey dude this is like i had before it sets same counter to all players not just for me
-
maybe this would be better, i had a table with skins list that all works so i made math.random(0,264) that should work fine. local root = getRootElement() addEventHandler("onResourceStart", root, function() team = createTeam ("Z.A.R.S.", 0, 0, 255) end ) addEventHandler("onPlayerLogin", root, function() setPlayerTeam ( source, team) outputChatBox ("Welcome to Zombie Apocalypse Rescue Squad HQ", source) -- it will say it for the logged in player only spawnPlayer (source, -2246.7751464844, 2283.3193359375, 5, 90, math.random(0,264), team ) -- spawns the player at the pos, with a random skin fadeCamera (source, true) setCameraTarget (source, true) end )
-
hi guys, i have a problem with some timers i need for my script to work like i want, the problem is that all works fine but the timers isnt setting for who uses /kill is setting it for all players not just client, here is my code. local locktime = 0 local times = {} function suicide ( player, commandName ) if ( player ) and locktime == 0 then killPed ( player ) times[player] = setTimer(Lock,50,1) times[player] = setTimer(UnLock,5000,1) elseif locktime == 1 then outputChatBox("ERROR: You can suicide once every 1 minute.",player,255,0,0) end end addCommandHandler ( "kill", suicide ) function Lock() locktime = 1 end function UnLock() locktime = 0 end
-
Dont really understand what is this exactly.
-
ahhh found it, thanks for all your help, you really helped me
-
like this should be? carCount = 0 maxCarCount = 1 car = {} function createMyVehicle(vehicleid,x,y,z) if vehicleid and x and y and z then if carCount <= maxCarCount then carCount = carCount + 1 car[source] = {} car[source][carcount] = {} car[source][carCount].car = createVehicle(vehicleid,x,y,z) setElementData ( car[source][carCount].car, "owner", source ) else destroyElement(car[source][carCount].car) carCount = carCount - 1 end end end addEvent("createVehicleFromGUI",true) addEventHandler("createVehicleFromGUI",root,createMyVehicle) function destroyVeh() carCount = carCount - 1 end addEventHandler("onVehicleExplode",getRootElement(),destroyVeh) if yes then it still not working but now gives a different error, server.lua:10: table index is nil
-
Anyone know how to make it working ?
-
Hey i can help you , go to this page https://wiki.multitheftauto.com/wiki/Scripting_Introduction and start to learn how to script. if u have problems u can ask at forums of course but not ask for someone to make scripts for you.
-
I tryed this before and does same problem. this is code now. carCount = 0 maxCarCount = 1 car = {} function createMyVehicle(vehicleid,x,y,z) if vehicleid and x and y and z then if carCount <= maxCarCount then carCount = carCount + 1 car[source] = {} car[source][carCount].car = createVehicle(vehicleid,x,y,z) setElementData ( car[source][carCount].car, "owner", source ) else destroyElement(car[source][carCount].car) carCount = carCount - 1 end end end addEvent("createVehicleFromGUI",true) addEventHandler("createVehicleFromGUI",root,createMyVehicle) function destroyVeh() carCount = carCount - 1 end addEventHandler("onVehicleExplode",getRootElement(),destroyVeh)
-
I dont understand what exactly u mean
-
carCount = 0 maxCarCount = 1 car = {} function createMyVehicle(vehicleid,x,y,z) if vehicleid and x and y and z then if carCount <= maxCarCount then carCount = carCount + 1 car[source][carCount] = {} car[source][carCount].car = createVehicle(vehicleid,x,y,z) setElementData ( car[source][carCount].car, "owner", source ) else destroyElement(car[source][carCount].car) carCount = carCount - 1 end end end addEvent("createVehicleFromGUI",true) addEventHandler("createVehicleFromGUI",root,createMyVehicle) function destroyVeh() carCount = carCount - 1 end addEventHandler("onVehicleExplode",getRootElement(),destroyVeh) makes a error in line "9" attempt to index field (a nil value)
-
still same error but now dosnt say "a nil value"
-
dosnt work it says at line of createVehicle "attempt to index field "?" (a nil value)" this current code: local carCount = 0 maxCarCount = 1 car = {} function createMyVehicle(vehicleid,x,y,z) if vehicleid and x and y and z then if carCount <= maxCarCount then carCount = carCount + 1 car[source] = {} car[source][carCount].car = createVehicle(vehicleid,x,y,z) setElementData ( car[carCount].car, "owner", source ) else destroyElement(car[carCount].car) carCount = carCount - 1 end end end addEvent("createVehicleFromGUI",true) addEventHandler("createVehicleFromGUI",root,createMyVehicle) function destroyVeh() carCount = carCount - 1 end addEventHandler("onVehicleExplode",getRootElement(),destroyVeh)
-
Hi, i have a problem with my car counter, it should count every car i spawn from my gui selector but the problem is that it sets the count for everyone and not for the local player here is my code so far: local carCount = 0 maxCarCount = 1 car = {} function createMyVehicle(vehicleid,x,y,z) if vehicleid and x and y and z then if carCount <= maxCarCount then carCount = carCount + 1 car[carCount] = {} car[carCount].car = createVehicle(vehicleid,x,y,z) setElementData ( car[carCount].car, "owner", source ) else destroyElement(car[carCount].car) carCount = carCount - 1 end end end addEvent("createVehicleFromGUI",true) addEventHandler("createVehicleFromGUI",root,createMyVehicle) function destroyVeh() carCount = carCount - 1 end addEventHandler("onVehicleExplode",getRootElement(),destroyVeh)
-
lol why not make your own ides?! u just want to copy valhalla server.
-
lol u and luke_ferra are same persons i think O_o
-
Is this your whole code?
-
Learn scripting and edit freeroam mode?
