Jump to content

tim260

Members
  • Posts

    157
  • Joined

  • Last visited

Everything posted by tim260

  1. Thanks mate it worked, does there excist to lock a car to ONE person and then ONE car and not like if i buy one in shop it says this car is only blablabla... but like ony cheetah (3) ( placed in map editor ) is for him. you know what im saying ?
  2. militaryVehicles = { [523]=true,[598]=true,[596]=true,[597]=true,[490]=true, [470]=true } militaryTeams = {["Military"]=true,["Naval"]=true} function militaryenterVehicle ( player, seat, jacked ) if ( militaryVehicles[getElementModel ( source )] ) and ( getPlayerTeam( player ) ) and ( not militaryTeams[getTeamName(getPlayerTeam( player ))] ) and ( seat == 0 ) then outputChatBox ( "You aren't a Military , you mayn't drive this.", player ) --and tell the player why cancelEvent() end end addEventHandler ( "onVehicleStartEnter", getRootElement(), militaryenterVehicle ) This is my vehicle testrictment script, how can i restrict it to a skin and not a team .... EDIT : also how do i add the thing that if spawn set team Geusts -- Settings for when a player joins -- XYZ coördinates local joinX = 0.0 local joinY = 0.0 local joinZ = 0.0 -- Weapon and ammo local joinWeapon = 22 local joinAmmo = 200 -- Message when player joins local joinMessage = "Welcome to this server." -- Skin that player gets local joinSkin = 0 -- Settings for when a player dies -- XYZ coördinates local spawnX = 0.0 local spawnY = 0.0 local spawnZ = 0.0 -- Weapon and ammo local spawnWeapon = 22 local spawnAmmo = 200 -- Skin that player gets local spawnSkin = 0 -- Settings for the amounts of money -- Money the killer gets local killerMoney = 500 -- Money removed from player when they die local deadPlayerMoney = 500 -- Money you get when you join local joinMoney = 1000 -- Functions -- This function spawns players when they join function spawnOnJoin() spawnPlayer(source, joinX, joinY, joinZ, 0 , joinSkin) fadeCamera(source, true) setCameraTarget(source, source) outputChatBox(joinMessage, source) giveWeapon(source, joinWeapon, joinAmmo) givePlayerMoney(source, joinMoney) end -- This function spawns players after they died function spawnOnDead(ammo, killer, weapon, bodypart) outputChatBox(getPlayerName(source).." died.") takePlayerMoney(source, deadPlayerMoney) if (killer) and (killer ~= source) then givePlayerMoney(killer, killerMoney) end setTimer(spawnPlayer, 3000, 1, source, spawnX, spawnY, spawnZ, 0, spawnSkin) setCameraTarget(source, source) setTimer(giveWeapon, 3000, 1, source, spawnWeapon, spawnAmmo) end -- Event handlers addEventHandler("onPlayerJoin", getRootElement(), spawnOnJoin) addEventHandler("onPlayerWasted", getRootElement(), spawnOnDead)
  3. Yes i changed it ;p function load() txd = engineLoadTXD("gun.txd", 31 ) engineImportTXD(txd, 31) dff = engineLoadDFF("gun.dff", 31 ) engineReplaceModel(dff, 31) end addEventHandler("onClientResourceStart",resourceRoot, function () local version = getVersion() if string.find(version.mta, "1.1.1") then setTimer ( load, 1000, 1) end end) type="script" version="1.0" author="tim"/>
  4. Thanks mate it worked , are you working for a server or something cuz i could use a team
  5. if getTeamName ( playerTeam ) == Security then change to ? if local playerTeam = getPlayerTeam(thePlayer) == Security then ??
  6. gate1 = createObject ( 980, -1753.9000244141, -115.90000152588, 5.3000001907349, 0, 0, 270.5 ) col = createColCircle ( -1753.9000244141, -115.90000152588, 5.3000001907349, 7 ) function opena51gates(thePlayer) if getTeamName ( playerTeam ) == Security then moveObject (gate1, 3000, -1754, -126, 5.3000001907349 ) end end addEventHandler( "onColShapeHit", col, opena51gates ) function closea51gates(thePlayer) if getTeamName ( playerTeam ) == Security then moveObject (gate1, 4000, -1753.9000244141, -115.90000152588, 5.3000001907349 ) end end addEventHandler( "onColShapeLeave", col, closea51gates ) its gives me a bad argument @ getteamname thats stuff whats wrong ??
  7. FIRST OFF : i know the first three pinned topics etc. but im still gonna do it even if you reply bad Hi all, Im tim ;p im just new to lua but not to server i have been scripting runescape private servers for years but now i quit that and im starting to make mta servers , as i didnt know where to post this i will here. Im already created the server ( non-hamachi for your info ;p ) added some resources and edited some resources i also have added some mods, so you have to download quite a lot when you come in game ( whats your oppinion about that bad/doesnt matter ? ) but from now im looking for a lua scripter who gets admin rights in game and scripts thing for the server also when the server is done ( i think it will be a rpg/roaming server, the team will get his own base mapped. So im looking for - co-owner - admins -mappers ( ive done thats already a bit so there are some bases mapped for a company i created in game with his own signs and trailers etc. ) - scripters ( the name says it all ) EDIT: maybe when im glad with a scripter i would pay but as i dont know how to do it ( NO PAYPAL ! ) someone has to explain so the easiest way is just some dutch guy who wants a wallie-card code LOl ;p Want any screens of the server so far ?, send me a message. Want to become the team reply
  8. tim260

    Set team on Join

    ive red this post and i also used the onlogin script but it didnt work some help ? EDIT: maybe can someone post his meta.xml from this
  9. Thanks solid snake the create teams works ( i should have someone like you in my team for the server LOl ) , but the weapon replacement isnt working
  10. first off can someone see what wrong to the code below so thats the first question function createTeamsOnStart () teamPolice = createTeam ( "Police", 0, 0, 255 ) teamRobber = createTeam ( "Robber", 255, 0, 0 ) teamMechanics = createTeam ( "Mechanics", 0, 255, 0 ) teamWhores = createTeam ( "Whores", 255, 0, 255 ) teamPilot = createTeam ( "Pilot", 255, 255, 0 ) teamTruker = createTeam ( "Trucker", 192, 192, 192 ) teamNubcaker = createTeam ( "Nubcaker INC.", 192, 192, 192 ) teamDealers = createTeam ( "Dealers", 255, 0, 0 ) teamMilitary = createTeam ( "Military", 0, 255, 0 ) teamNaval = createTeam ( "Naval", 0, 255, 0 ) teamSecurity = createTeam ( "Security", 0, 255, 0 ) teamSecurity = createTeam ( "investors", 255, 255, 0 ) teamGuests = createTeam ( "Guests", 255, 255, 0 ) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), createTeamsOnStart ) Second question, Is it possible to replace weapons i tried it with the engineLoadDFF engineLoadTXD but it didnt work so can someone explain it to me.
  11. I edited this script so its only for military but its not working when im in no team ( so team:none ) it doesnt work i just enter militaryVehicles = { [523]=true,[598]=true,[596]=true,[597]=true,[490]=true } militaryTeams = {["Military"]=true,["Naval"]=true} function militaryenterVehicle ( player, seat, jacked ) if ( militaryVehicles[getElementModel ( source )] ) and ( not militaryTeams[getTeamName(getPlayerTeam( player ))] ) and ( seat == 0 ) then outputChatBox ( "You aren't a Military Officer , you mayn't drive this.", player ) --and tell the player why cancelEvent() end end addEventHandler ( "onVehicleStartEnter", getRootElement(), militaryenterVehicle )
  12. Hi all, Im tim ;p im just new to lua but not to server i have been scripting runescape private servers for years but now i quit that and im starting to make mta servers , as i didnt know where to post this i will here. Im already created the server ( non-hamachi for your info ;p ) added some resources and edited some resources i also have added some mods, so you have to download quite a lot when you come in game ( whats your oppinion about that bad/doesnt matter ? ) but from now im looking for a lua scripter who gets admin rights in game and scripts thing for the server also when the server is done ( i think it will be a rpg/roaming server, the team will get his own base mapped. So im looking for - co-owner ( rather someone with lua exp. ) - admins ( lua also would be good ) - moderators -mappers ( ive done thats already a bit so there are some bases mapped for a company i created in game with his own signs and trailers etc. ) - scripters ( the name says it all ) Want any screens of the server so far ?, send me a message. Want to become the team reply
  13. Restrict a team by getting the acl group the acl group name is: Nubcaker INC.
  14. your meta xml should look : "NAME" version="1.0" type="script"/> you carpack should look : function replaceModel() txd = engineLoadTXD("PATH TO TXD", CAR ID ) engineImportTXD(txd, CAR ID) dff = engineLoadDFF("PATH TO MOD DFF", CAR ID ) engineReplaceModel(dff, CAR ID) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) addCommandHandler ( "reloadcar", replaceModel )
  15. im using a resource to select a team in the beginning and i was wondering how to restrict use to get in a certain team, i done some reaserch but couldnt find it can someone help me please, thanks in advance.
  16. LOL thats how it looks how you wrote it
  17. Hmm Solidsnake it doesnt work probably its me making a mistake here so now i will thake this oppertunity to show this : ( its also not working but i dont know why ) function replaceTXD() txd = engineLoadTXD("textures/billbrd01_lan.txd") engineImportTXD(txd, 4238) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceTXD) /\ thats my replacement for a billboard but it doesnt work, below my meta \/ type="script" version="1.0" author="tim"/> type="client" src="textures/billbrd01_lan.txd"/>
  18. Both didnt work can you help me ?
  19. copVehicles = { [470]=true,[433]=true,[548]=true,[532]=true,[425]=true } copTeams = {["Police"]=true,["Cop"]=true} function copenterVehicle ( player, seat, jacked ) if ( copVehicles[getElementModel ( source )] ) and ( not copTeams[getTeamName(getPlayerTeam( player ))] ) and ( seat == 0 ) then removePedFromVehicle ( player )--force the player out of the vehicle outputChatBox ( "You aren't a Police Officer , you mayn't drive this.", player ) --and tell the player why end end addEventHandler ( "onVehicleEnter", getRootElement(), copenterVehicle ) If i wanna make this for military vehicles what do i change ? do i do it like this ? : militaryVehicles = { [523]=true,[598]=true,[596]=true,[597]=true,[490]=true } copTeams = {["Military"]=true,["Naval"]=true} function copenterVehicle ( player, seat, jacked ) if ( militaryvehiclesVehicles[getElementModel ( source )] ) and ( not copTeams[getTeamName(getPlayerTeam( player ))] ) and ( seat == 0 ) then removePedFromVehicle ( player )--force the player out of the vehicle outputChatBox ( "You aren't a Military Officer , you mayn't drive this.", player ) --and tell the player why end end addEventHandler ( "onVehicleEnter", getRootElement(), copenterVehicle )
  20. Thanks TAPL This is the code ? so i see there is written teamAdmmin with 2 "m" is that correct function createTeamsOnStart () teamAdmmin = createTeam ( "Admin", 0, 255, 0 ) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), createTeamsOnStart ) local root = getRootElement() addEventHandler("onPlayerLogin", root if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Admin" ) ) then local theTeam = getPlayerTeam ( source ) if theTeam then setPlayerTeam ( source, Admin ) end end
  21. it works thanks i have another qeustion now, how to make a team only for admins ?
  22. function checkClass(hitElement, matchingDimension) if ( getElementType(hitElement) == "vehicle" ) then hitElement = getVehicleController(hitElement) end for i=0,#gateList do local name = getTeamName(getPlayerTeam(hitElement)) if(name == false) then name = "false" end if ( name == team[i] or name == "false") then detection = isElementWithinColShape ( hitElement, shapes[i] ) if detection == true then move(i, false) end end end end thats the script but it really says that the getteamname is wrong in the server Bad argument @ `getTeamName`
  23. I have an error when im using the gatemaker tried to use some other functions and stuff i have red the wiki but i dont understand the errors it says bad argument @ getTeamName and its on rule 24 see it below local name = getTeamName(getPlayerTeam(hitElement))
  24. i get an error http 404 housing_system/home.jpg
×
×
  • Create New...