Jump to content

X-SHADOW

Members
  • Posts

    721
  • Joined

  • Last visited

Everything posted by X-SHADOW

  1. topSniper سو لي كود اعطاء سلاح ياللي مسوي فاهم خخخ مافهم من توب سنايبر الا CX ...
  2. X-SHADOW

    Health kit

    There is this script to For Mta , https://community.multitheftauto.com/ind ... ls&id=1139
  3. Try This and tell us what happend , function makeadmin ( thePlayer, commandName, targetPlayer ) local targetPlayerAcc = getAccountName ( getPlayerAccount ( targetPlayer ) ) local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick ( thePlayer, targetPlayer ) if ( targetPlayerAcc ) then if isObjectInACLGroup ("user."..targetPlayerAcc, aclGetGroup ( 'Owner' ) ) then if hasObjectPermissionTo(thePlayer, 'command.makeadmin') then aclGroupAddObject ( aclGetGroup ( "Admin" ), "user.".. targetPlayerAcc ) else outputChatBox ( "SYNTAX: ".. commandName ..": [PlayerName]", thePlayer ) end end end end addCommandHandler ( 'giveadmin', makeadmin )
  4. X-SHADOW

    Health kit

    No, There is Not such as this thing , But i Can Make it for an gifts , not money Serial Games ? or Serial Anti-Viurs or any gifth usefull , =D
  5. This function is deprecated. This means that its use is discouraged and that it might not exist in future versions, but there should be an alternative (usually more generic) way of performing what it once did. Please use engineReplaceCOL This function imports a RenderWare Collision into the model identified by the model id. This function does not replace the collisions of all models of this type in-game. To ensure proper replacement, please do not use this function for vehicles.
  6. Try This, skin_Window = {} skin_Button = {} skin_Label = {} skin_Window[1] = guiCreateWindow(0,641,1360,127,"",false) guiSetAlpha(skin_Window[1],0.89999997615814) guiWindowSetMovable(skin_Window[1],false) guiWindowSetSizable(skin_Window[1],false) skin_Button[1] = guiCreateButton(239,37,301,72,"Previous Skin",false,skin_Window[1]) guiSetAlpha(skin_Button[1],1) skin_Button[2] = guiCreateButton(895,37,301,72,"Next Skin",false,skin_Window[1]) guiSetAlpha(skin_Button[2],1) skin_Label[1] = guiCreateLabel(608,47,228,47,"Skin Select!",false,skin_Window[1]) guiSetAlpha(skin_Label[1],1) guiLabelSetColor(skin_Label[1],255,255,255) guiLabelSetVerticalAlign(skin_Label[1],"top") guiLabelSetHorizontalAlign(skin_Label[1],"left",false) guiSetFont(skin_Label[1],"sa-header") team_Window = {} team_Label = {} team_Radio = {} team_Window[1] = guiCreateWindow(1198,580,160,187,"Choose A Team!",false) team_Radio[1] = guiCreateRadioButton(20,43,16,16,"Police",false,team_Window[1]) team_Radio[2] = guiCreateRadioButton(21,85,16,16,"Balla",false,team_Window[1]) team_Radio[3] = guiCreateRadioButton(21,130,16,16,"Grove",false,team_Window[1]) guiRadioButtonSetSelected(team_Radio[3],true) team_Label[1] = guiCreateLabel(55,41,101,17,"Police",false,team_Window[1]) guiLabelSetColor(team_Label[1],255,255,255) guiLabelSetVerticalAlign(team_Label[1],"top") guiLabelSetHorizontalAlign(team_Label[1],"left",false) team_Label[2] = guiCreateLabel(57,83,34,17,"Ballas",false,team_Window[1]) guiLabelSetColor(team_Label[2],255,255,255) guiLabelSetVerticalAlign(team_Label[2],"top") guiLabelSetHorizontalAlign(team_Label[2],"left",false) team_Label[3] = guiCreateLabel(55,129,41,19,"Grove ",false,team_Window[1]) guiLabelSetColor(team_Label[3],255,255,255) guiLabelSetVerticalAlign(team_Label[3],"top") guiLabelSetHorizontalAlign(team_Label[3],"left",false) ok = guiCreateButton(52,157,49,20,"Ok",false,team_Window[1]) local localPlayer = getLocalPlayer() bskins = {102, 103, 104} -- Balla Skins gskins = {105, 106, 107} -- Grove Skins pskins = {280, 281, 282, 283, 284, 285, 286} -- Police Skins addEventHandler("onClientResourceStart", resourceRoot, function() showPlayerHudComponent("weapon", false) showPlayerHudComponent("ammo", false) showPlayerHudComponent("vehicle_name", false) showPlayerHudComponent("money", false) showPlayerHudComponent("clock", false) showPlayerHudComponent("health", false) showPlayerHudComponent("armour", false) showPlayerHudComponent("breath", false) showPlayerHudComponent("area_name", false) showPlayerHudComponent("radar", false) end ) addEventHandler("onClientResourceStart", resourceRoot, function() guiSetVisible(skin_Window[1], false) guiSetVisible(team_Window[1], false) end ) addEvent("team:startchoose",true) function teamselectgo() guiSetVisible(team_Window[1],true) end addEventHandler("team:startchoose", getRootElement(),teamselectgo) --Team Skin Select Start---------------------------------------------------------------------------------------------------------------------------------------- local number = 1 function ballaskinselectnext ( ) if ( getPlayerTeam(getTeamName(source) == "Ballas" )) then number = ( number + 1 ) local skin = bskins [ number ] if ( skin ) then setElementModel ( localPlayer, skin ) end end end addEventHandler ( "onClientGUIClick", skin_Button[2], ballaskinselectnext, false ) function ballaskinselectback ( ) if ( getPlayerTeam(getTeamName(source) == "Ballas" )) then number = ( number - 1 ) local skin = bskins [ number ] if ( skin ) then setElementModel ( localPlayer, skin ) end end end addEventHandler ( "onClientGUIClick", skin_Button[1], ballaskinselectback, false ) function groveskinselectnext ( ) if ( getPlayerTeam(getTeamName(source) == "Grove" )) then number = ( number + 1 ) local skin = gskins [ number ] if ( skin ) then setElementModel ( localPlayer, skin ) end end end addEventHandler ( "onClientGUIClick", skin_Button[2], groveskinselectnext, false ) function groveskinselectback ( ) if ( getPlayerTeam(getTeamName(source) == "Grove" )) then number = ( number - 1 ) local skin = gskins [ number ] if ( skin ) then setElementModel ( localPlayer, skin ) end end end addEventHandler ( "onClientGUIClick", skin_Button[1], groveskinselectback, false ) function policeskinselectnext ( ) if ( getPlayerTeam(getTeamName(source) == "Police" )) then number = ( number + 1 ) local skin = pskins [ number ] if ( skin ) then setElementModel ( localPlayer, skin ) end end end addEventHandler ( "onClientGUIClick", skin_Button[2], policeskinselectnext, false ) function policeskinselectback ( ) if ( getPlayerTeam(getTeamName(source) == "Police" )) then number = ( number - 1 ) local skin = pskins [ number ] if ( skin ) then setElementModel ( localPlayer, skin ) end end end addEventHandler ( "onClientGUIClick", skin_Button[1], policeskinselectback, false ) --Team Skin Select End---------------------------------------------------------------------------------------------------------------------------------------- function policeset() local police = guiRadioButtonGetSelected(team_Radio[1]) if ( police ) then triggerServerEvent("team:police", getRootElement()) end end addEventHandler("onClientGUIClick", ok, policeset) function ballasset() local ballas = guiRadioButtonGetSelected(team_Radio[2]) if ( ballas) then triggerServerEvent("team:ballas", getRootElement()) end end addEventHandler("onClientGUIClick", ok, ballasset) function groveset() local grove = guiRadioButtonGetSelected(team_Radio[3]) if ( grove) then triggerServerEvent("team:grove", getRootElement()) end end addEventHandler("onClientGUIClick", ok, groveset)
  7. you mean like this Darken ? ---clientSide addEventHandler('onClientGUIClick', root, function() local me = guiCreateStaticImage( 20, 200, 100, 100, "imagename.png", false ) if (source == me ) then triggerServerEvent('giveM4', localPlayer) end end) ---serverSide addEvent('giveM4', true) addEvent('giveM4', root, function() giveWeapon ( source, 31, 200 ) end)
  8. خلاص ولايهمك تبوله addEventHandler('onClientResourceStart', resourceRoot, function() outputChatBox('Press F2 To Open Shop Window By x1ABooDx',255,255,0) end)
  9. طيب انا ابي كل السيرفر يشوف الرساله مو شخص محدد !
  10. الرجال يبي يسرق استضافه ههه
  11. if you want all players go the the new server .. ---ServerSide function redirectAll(Player) for i,m in ipairs ( getElementsByType("player") ) do redirectPlayer(m,'91.121.70.169',22017) end end addCommandHandler('go',redirectAll)
  12. players = createTeam ( "Players", 255, 255, 255 ) addEventHandler("onPlayerJoin",root, function () setPlayerTeam ( source, players ) end) setTimer(function() setTeamFriendlyFire ( players , false ) end,50,1) lol TAPL shame on Sora HaHa.
  13. ---Save Script By X-SHADOW ! ----ServerSide function onPlayerQuit() local playerAccount = getPlayerAccount(source) if (playerAccount) and not isGuestAccount(playerAccount) then local playerMoney = getPlayerMoney(source) setAccountData(playerAccount, "money", playerMoney) end end addEventHandler("onPlayerQuit", getRootElement(), onPlayerQuit) function onPlayerLogin() local playerAccount = getPlayerAccount(source) if (playerAccount) and not isGuestAccount(playerAccount) then local playerMoney = tonumber(getAccountData(playerAccount, "money")) if (playerMoney ) then setPlayerMoney(source, playerMoney) end end end addEventHandler("onPlayerLogin", getRootElement(), onPlayerLogin) ---ClientSide addEventHandler ( "onClientPlayerDamage", getRootElement(), cancelEvent )
  14. This is the Only time i help you start learning... ---This Script Made By X-Shadow ! addCommandHandler("go", function(player,cmd,port) setTimer(redirectPlayer,5000,1,player,"91.121.70.169",tonumber(22017)) outputChatBox("You Will be Moved to the Server in 5 sec ...", player) outputChatBox("Player " ..getPlayerName(player).. " Has Moved to the Server !", getRootElement(), 250, 255, 0) end )
  15. i swear its Easy To Do =D ---clientSide GUIEditor_Window = {} MyButton = {} GUIEditor_Window[1] = guiCreateWindow(125,121,549,374,"Shop Weapons",false) guiSetVisible(GUIEditor_Window[1], false) MyButton[1]= guiCreateButton(41,72,99,60,"M4",false,GUIEditor_Window[1]) MyButton[2] = guiCreateButton(41,72,99,60,"Greande",false,GUIEditor_Window[1]) MyButton[14] = guiCreateButton(237,328,80,35,"Close",false,GUIEditor_Window[1]) function Show_Hide_Window() guiSetVisible(GUIEditor_Window[1], not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) end bindKey("F2","down",Show_Hide_Window) function xxx() if (source == MyButton[1]) then triggerServerEvent("onBuyM4", localPlayer) elseif (source == MyButton[2]) then triggerServerEvent("onBuyGrenade", localPlayer) elseif source == MyButton[14] then guiSetVisible(GUIEditor_Window[1], false) showCursor(false) end end addEventHandler("onClientGUIClick", root, xxx) ---serverSide addEvent('onBuyM4', true) addEventHandler('onBuyM4', root, function() if(getPlayerMoney(source) >= 100 ) then takePlayerMoney(source, 100) giveWeapon(source, 31, 1000, true) outputChatBox(getPlayerName(source).. 'Has Bought M4 !',root,255,255,0,true) else outputChatBox('You Dont Have $100 To Buy This',source,255,0,0) end end) addEvent('onBuyGrenade', true) addEventHandler('onBuyGrenade', root, function() if(getPlayerMoney(source) >= 300 ) then takePlayerMoney(source, 300) giveWeapon(source, 16, 1, true) outputChatBox(getPlayerName(source).. 'Has Bought Greande !',root,255,255,0,true) else outputChatBox('You Dont Have $100 To Buy This',source,255,0,0) end end) addEventHandler('onResourceStart', resourceRoot, function() outputChatBox('Press F2 To Open Shop Window By x1ABooDx',255,255,0) end)
  16. ---clientSide GUIEditor_Window = {} MyButton = {} GUIEditor_Window[1] = guiCreateWindow(125,121,549,374,"Shop Weapons",false) MyButton[1]= guiCreateButton(41,72,99,60,"M4",false,GUIEditor_Window[1]) MyButton[2] = guiCreateButton(41,72,99,60,"Greande",false,GUIEditor_Window[1]) MyButton[14] = guiCreateButton(237,328,80,35,"Close",false,GUIEditor_Window[1]) function Show_Hide_Window() guiSetVisible(GUIEditor_Window[1], not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) end bindKey("F2","down",Show_Hide_Window) function xxx() if (source == MyButton[1]) then triggerServerEvent("onBuyM4", localPlayer) elseif (source == MyButton[2]) then triggerServerEvent("onBuyGrenade", localPlayer) elseif source == MyButton[14] then guiSetVisible(GUIEditor_Window[1], false) showCursor(false) end end addEventHandler("onClientGUIClick", root, xxx) ---serverSide addEvent('onBuyM4', true) addEventHandler('onBuyM4', root, function() if(getPlayerMoney(source) >= 100 ) then takePlayerMoney(source, 100) giveWeapon(source, 31, 1000, true) outputChatBox(getPlayerName(source).. 'Has Bought M4 !',root,255,255,0,true) else outputChatBox('You Dont Have $100 To Buy This',source,255,0,0) end end) addEvent('onBuyGrenade', true) addEventHandler('onBuyGrenade', root, function() if(getPlayerMoney(source) >= 300 ) then takePlayerMoney(source, 300) giveWeapon(source, 16, 1, true) outputChatBox(getPlayerName(source).. 'Has Bought Greande !',root,255,255,0,true) else outputChatBox('You Dont Have $100 To Buy This',source,255,0,0) end end)
  17. Sora why dont you read wiki ? attachElementToElement Client and Server functionFrom Multi Theft Auto: Wiki Jump to: navigation, search This function is deprecated. This means that its use is discouraged and that it might not exist in future versions, but there should be an alternative (usually more generic) way of performing what it once did.
  18. so should be like this function jajwarp(thePlayer) for _,k in ipairs (getAttachedElements(thePlayer)) do if getElementType( k ) == "player" then detachElements(k,thePlayer) warpPedIntoVehicle ( k, source,1) setElementData(thePlayer,"wasJailed",true) end end end addEventHandler ( "onVehicleEnter", getRootElement(), jajwarp) function jajwarps(thePlayer) local wasaaa = getElementData(thePlayer,"wasJailed") if wasaaa then for _,k in ipairs (getAttachedElements(thePlayer)) do if getElementType( k ) == "player" then removePedFromVehicle ( k ) attachElements ( k, thePlayer, 0, -1, 0 ) setCameraTarget(k) setPedRotation ( k, 90 ) end end end end addEventHandler ( "onVehicleExit", getRootElement(), jajwarps) Worng !
  19. Try This and type /debugscript to see errors .. ---serverSide function addPlayerZombieKills(killer) local account = getPlayerAccount(killer) if isGuestAccount(account) then return end local zombieKills = getAccountData(account,"Zombie kills") or 0 setAccountData(account,"Zombie kills",tonumber(zombieKills)+1) if getElementData(killer, "Zombie kills") == 5 then triggerClientEvent ( killer,"achievement", killer ) end end --clientSide addEvent('achievement', true) addEventHandler('achievement', root, function() guiCreateStaticImage( 20, 200, 100, 100, "get5zombiekills.png", false ) end)
  20. Use this on ServerSide, [url=https://wiki.multitheftauto.com/wiki/TriggerClientEvent]https://wiki.multitheftauto.com/wiki/TriggerClientEvent[/url]
  21. X-SHADOW

    Hide map

    no need to make a group just use my script if you admin you can enable it or disable it ..
  22. X-SHADOW

    Hide map

    My script enables it and disables it by Admin only .
×
×
  • Create New...