Jump to content

Amine#TN

Members
  • Posts

    99
  • Joined

  • Last visited

Everything posted by Amine#TN

  1. function handlingChange() setModelHandling(490, "maxVelocity", 900) end addEventHandler("onResourceStart", resourceRoot, handlingChange)
  2. Thanx all it is working fine
  3. it is working thanx can you give me the command to change the account without getting the player name i want to change some data when players are offline
  4. setAccountData(getPlayerFromName("striker"),"Boss kills",5000) i used this and i get Command executed Result: false and when i use setElementData(getPlayerFromName("striker"),"Boss Kills",5000) i get Command executed Result: True and my Boss kills change but when i reconnect changes lost
  5. exemple of a command for exemple for "myZom" "5000" as an account data the full command
  6. hi all i hope all fine i want to know if i can use this to change an account data like kills or zombies kills and if it possible give me an exemple of the command to change the data and if it is not possible here can any one give me a resource to change the account data of the player i need it soon as possible i lost some data of players and thanx all
  7. Amine#TN

    spawn

    wait i will test something i get that warning Bad argument @ 'giveWeapon' [Expected element at argument 1, got nil] with that code local randomSpawnTable = { { 152.24,-2090,300 }, { 152.24,-2090,300 }, { 152.24,-2090,300 } } function randomSpawn( thePlayer, randomSpawnTable ) local random = math.random( 1, #randomSpawnTable ) spawnPlayer( thePlayer, randomSpawnTable[random][1], randomSpawnTable[random][2], randomSpawnTable[random][3] ) setElementModel ( thePlayer, 312 ) giveWeapon ( thePlayer, 46 ) giveWeapon ( thePlayer, 9 ) giveWeapon ( thePlayer, 22, 5000 ,true ) giveWeapon ( thePlayer, 25, 5000 ,true ) giveWeapon ( thePlayer, 28, 5000 ,true ) giveWeapon ( thePlayer, 31, 5000 ,true ) giveWeapon ( thePlayer, 22, 5000 ,true ) end function onPlayerJoin( ) fadeCamera( thePlayer, true ) setCameraTarget( thePlayer, source , true ) randomSpawn( thePlayer, randomSpawnTable , true ) end addEventHandler( "onPlayerJoin",root, onPlayerJoin )
  8. Amine#TN

    spawn

    hey guys i made that script to give any new player a skin ,some guns and a unified spawn point and i dont know why he is not working local randomSpawnTable = { { 152.24,-2090,300 }, { 152.24,-2090,300 }, { 152.24,-2090,300 } } function randomSpawn( thePlayer, randomSpawnTable ) local random = math.random( 1, #randomSpawnTable ) spawnPlayer( thePlayer, randomSpawnTable[random][1], randomSpawnTable[random][2], randomSpawnTable[random][3], randomSpawnTable[random][4] ) end function giveguns () setElementModel ( thePlayer, 312 ) giveWeapon ( thePlayer, 46 ) giveWeapon ( thePlayer, 9 ) giveWeapon ( thePlayer, 22, 5000 ,true ) giveWeapon ( thePlayer, 25, 5000 ,true ) giveWeapon ( thePlayer, 28, 5000 ,true ) giveWeapon ( thePlayer, 31, 5000 ,true ) giveWeapon ( thePlayer, 22, 5000 ,true ) end addEventHandler( "onPlayerJoind",root, giveguns ) function onPlayerJoind( ) fadeCamera( thePlayer, true ) setCameraTarget( thePlayer, source ) randomSpawn( thePlayer, randomSpawnTable ) end addEventHandler( "onPlayerJoind",root, onPlayerJoind )
  9. thanx for your help but the problem was in the timer that fonction need an EventHandler
  10. Amine#TN

    Jail System

    Hello, I Need Some Help At this Script ! Error Message : Bad argument @ 'getPlayerWantedLevel' [Expected player at argument 1, got nil ] Bad argument @ 'getElementData' [Expected element at argument 1, got nil] .. Thanks ---- Script ---- function autoJail () if getElementData( source,"bag") and getElementData( source,"bag") == true then cancelEvent() else theWL = getPlayerWantedLevel ( source ) if (theWL == 6 ) then if isPedInVehicle ( source ) then removePedFromVehicle ( source ) end setTimer ( toggleControl, (1000*11), 1, source, 'fire', false) setElementPosition ( source, -2174,1861,0.6, true) theName = getPlayerName ( source ) outputChatBox ( ""..theName.. " #FF0000Was Jailed For #00FF001 Min. #FF0000by the #00FF00Server#FF0000[Reason]~>#00FF006******", root,255,255,255,true ) setTimer ( setElementPosition, (1000*60*2), 1, source, 1544.4332275391, -1674.7698974609, 13.688399200439) setTimer ( outputChatBox, (1000*60*2), 1, ""..theName.. " #00FF00Finished his Jail Sentence; Is Released !", root,255,255,255,true ) setTimer ( setElementInterior, (1000*60*2), 1, source, 0) setTimer ( setElementDimension, (1000*60*2), 1, source, 0) setTimer ( fadeCamera, (1000*59*2), 1, source, false) setTimer ( fadeCamera, (1000*60*2), 1, source, true) setTimer ( toggleControl, (1000*60*2), 1, source, 'fire', true) setPedAnimation ( source, false) setPlayerWantedLevel (source, 0) end end end setTimer ( autoJail , 1000, 0)
  11. i have an ubuntu vps it is not protected id some one know how to install anti-DDOS pls tell me
  12. dont worry i fixed it and thanx for the fonction of taking the weapon from the player
  13. that script allow staff on the team staff to use that guns but i need to make it allow staff in aclGroup to use that guns
  14. ahhh thanx bro you can make it local the acl admin and supermoderator
  15. i will give you exemple in my server the knife is a forbidden weapon and some staff give it to players i want a script to replace the gun gived to the player maybe katana or any thing or destroy it
  16. bro you did not understand i want a script to destroy the guns forbidden for the simple players and locale the acl not the team
  17. ahhh done i edited the topic
  18. i didnt understand what you want
  19. server site disallowedWeapons = {} function loadSettings() settings = xmlLoadFile ( "settings.xml" ) disWeaponsNode = xmlFindChild ( settings, "disallowed_weapons", 0 ) ill_weaponNodes = xmlNodeGetChildren ( settings ) for k, node in ipairs ( ill_weaponNodes ) do disallowedWeapons[k] = xmlNodeGetAttribute ( node, "id" ) end adminOnly = xmlNodeGetValue ( xmlFindChild ( settings, "admin_only", 0 ) ) end function checkWeapon ( prevSlot, curSlot ) local weapon = getPedWeapon ( getLocalPlayer(), curSlot ) local weaponName = getWeaponNameFromID ( weapon ) local pName = getPlayerName ( source ) for index, weaponID in ipairs ( disallowedWeapons ) do if tonumber(weapon) == tonumber(weaponID) then if getTeamName ( getPlayerTeam ( getLocalPlayer() ) ) == "STAFFS" then if adminOnly == "true" then --let it slide outputChatBox ( "Don't abuse it :)", 0, 255, 0 ) break else illegalWeaponFound ( getLocalPlayer(), weapon ) break end else illegalWeaponFound ( getLocalPlayer(), weapon ) break end else toggleControl ( "fire", true ) toggleControl ( "action", true ) end end end function illegalWeaponFound ( player, weapon ) toggleControl ( "fire", false ) toggleControl ( "action", false ) triggerServerEvent ( "onIllegalWeapon", getLocalPlayer(), getWeaponNameFromID(getPedWeapon(getLocalPlayer(), curSlot ) ), getPlayerName(source) ) end addEventHandler ( "onClientPlayerWeaponSwitch", getRootElement(), checkWeapon ) addEventHandler ( "onClientResourceStart", getResourceRootElement ( getThisResource() ), loadSettings ) ---------------------------------- server site addEvent ( "onIllegalWeapon", true ) addEventHandler ( "onIllegalWeapon", getRootElement(), function ( weaponName, pName ) outputChatBox ( "#FF0000The Player #FFFFFF" ..pName.. " #FF0000Has Been Kicked Because He use #00FF00" ..weaponName.. "#FF0000", getRootElement(), 255, 0, 0, true ) setTimer ( kickPlayer , 1000 , 1 , source , "You Use An Forbidden Weapon!") end ) ----------------------------------- <meta><info description="This script warns server and possibly punishes when a player pulls an illegal weapon" name="Anti Cheat Weapons" type="script" version="3.0" author="Dr.PhillyBlunt"/><script type="server" src="server.lua"/><script type="client" src="client.lua"/><config type="client" src="settings.xml"/></meta> ----------------------------------- i want if some one can upgrade it make it destroy the gun of the player + kick it and make it with acl not team
  20. Amine#TN

    help

    i made that script as a base door i want to upgrade it ------------------------------------------------------------------------- local Marker1 = createMarker (1638.0502929688, -1152.9975585938, 22.5, "cylinder", 4, 255, 0, 0, 100) function Entre ( hitPlayer, matchingDimension ) setElementPosition ( hitPlayer, 1637.2869873047, -1132.6866455078, 23.90625 ) outputChatBox ( "Welcome to Los Santos Boss Area!",hitPlayer ) end addEventHandler( "onMarkerHit", Marker1, Entre) -------------------------------------------------------------------------- i want to make it only players on foot can enter also zombies and other peds cant enter to this base
  21. Amine#TN

    problem

    i already install and setup my mta server on my VPS and i dont know why when i close PUTTY (control panel) the server shutdown any help
  22. i did not need it when the player want his car he must go to the place where i create it and thanx
×
×
  • Create New...