
xXMADEXx
Members-
Posts
2,718 -
Joined
-
Last visited
Everything posted by xXMADEXx
-
Thank you! This was very usefull!
-
How can i make it so that when an admin types /addped it will save the ped to peds.xml somthink like this <peds> <ped x="posX" y="posY" z="posZ" rot="rotationZ" int="interitor" dim="dimenshin"></ped> </peds> -- Server side function pedfunc (player, cmd, id) if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( player ) ), aclGetGroup ( "Admin" ) ) then local x, y, z = getElementPosition(player) local rx = getElementRotation(player) local int = getElementInterior(player) created = createPed ( id, x+1, y, z, rx, int, 0 ) setElementFrozen(created, true) outputChatBox("Ped-System: You have successfully made a ped with an ID of #ff0000".. id, player, 0, 255, 0, true ) if ( id == " " ) then outputChatBox("Ped-System: Error, the command is /addped ", player, 255, 0, 0 ) end else outputChatBox("Ped-System: This command is only for admins!", player, 255, 0, 0 ) end end addCommandHandler("addped", pedfunc)
-
I am making this jail system, and when i type /jailhim xXMADEXx test, the outputChatBox will work fine, but it will not set the persons position or interior. function jail(player, cmd, prisoner, ... ) local text = table.concat({...}, " ") local nick=getPlayerName(player) local nick2=getPlayerName(prisoner) outputChatBox(prisoner .." Has Been Jailed By ".. nick .." ( ".. text .." )", root, 255, 0, 0 ) setElementPosition(nick2, 264.2540, 78.686, 101) setElementInterior(nick2, 6) end addCommandHandler("jailhim", jail)
-
Hey, how can i make this code: addEventHandler("onClientRender",root, function() dxDrawText("A simple example.",521.0,294.0,888.0,494.0,tocolor(0,255,0,255),5.0,"default","left","top",false,false,false) end ) load with a custom font? the font name is draw.ttf
-
Humm.. So how could i get the scoreboard to get the group name? with setElementData ?
-
How can i get the players group out from here, and place it in the "Group" colum in the scoreboard? -- server -- http://pastebin.com/VBMRTjgL
-
For some reason, it didnt work.
-
Hey, i have this script that i downloaded (Im not trying to take credit for it in any way) and when you reconnect, or die it will remove you from your team. How can i fix this. (that is the only problem with it) function onPlayerQuit ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local x,y,z = getElementPosition (source) setAccountData ( playeraccount, "s.HandMoney", getPlayerMoney ( source ) ) setAccountData (playeraccount, "s.skin", tostring (getPedSkin (source))) setAccountData (playeraccount, "s.x", x) setAccountData (playeraccount, "s.y", y) setAccountData (playeraccount, "s.z", z) setAccountData (playeraccount, "s.int", getElementInterior (source)) setAccountData (playeraccount, "s.dim", getElementDimension (source)) setAccountData (playeraccount, "s.rot", getPlayerRotation (source)) setAccountData (playeraccount, "s.weap0", getPedWeapon ( source, 0 )) setAccountData (playeraccount, "s.weap1", getPedWeapon ( source, 1 )) setAccountData (playeraccount, "s.weap2", getPedWeapon ( source, 2 )) setAccountData (playeraccount, "s.ammo2", getPedTotalAmmo ( source, 2 )) setAccountData (playeraccount, "s.weap3", getPedWeapon ( source, 3 )) setAccountData (playeraccount, "s.ammo3", getPedTotalAmmo ( source, 3 )) setAccountData (playeraccount, "s.weap4", getPedWeapon ( source, 4 )) setAccountData (playeraccount, "s.ammo4", getPedTotalAmmo ( source, 4 )) setAccountData (playeraccount, "s.weap5", getPedWeapon ( source, 5 )) setAccountData (playeraccount, "s.ammo5", getPedTotalAmmo ( source, 5 )) setAccountData (playeraccount, "s.weap6", getPedWeapon ( source, 6 )) setAccountData (playeraccount, "s.ammo6", getPedTotalAmmo ( source, 6 )) setAccountData (playeraccount, "s.weap7", getPedWeapon ( source, 7 )) setAccountData (playeraccount, "s.ammo7", getPedTotalAmmo ( source, 7 )) setAccountData (playeraccount, "s.weap8", getPedWeapon ( source, 8 )) setAccountData (playeraccount, "s.ammo8", getPedTotalAmmo ( source, 8 )) setAccountData (playeraccount, "s.weap9", getPedWeapon ( source, 9 )) setAccountData (playeraccount, "s.ammo9", getPedTotalAmmo ( source, 9 )) setAccountData (playeraccount, "s.weap10", getPedWeapon ( source, 10 )) setAccountData (playeraccount, "s.weap11", getPedWeapon ( source, 11 )) setAccountData (playeraccount, "s.weap12", getPedWeapon ( source, 12 )) end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) local root = getRootElement() addEventHandler("onPlayerLogin", root, function() local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local playermoney = getAccountData ( playeraccount, "s.HandMoney" ) if ( playermoney ) then setPlayerMoney ( source, playermoney ) end local playerInt = getAccountData (playeraccount, "s.int") local playerDim = getAccountData (playeraccount, "s.dim") local playerSkin = getAccountData (playeraccount, "s.skin") local playerX = getAccountData (playeraccount, "s.x") local playerY = getAccountData (playeraccount, "s.y") local playerZ = getAccountData (playeraccount, "s.z") local playerRot = getAccountData (playeraccount, "s.rot") spawnPlayer(source, playerX, playerY, playerZ, playerRot, playerSkin, playerInt, playerDim) fadeCamera (source, true) setCameraTarget (source, source) local weap0 = getAccountData(playeraccount, "s.weap0") local weap1 = getAccountData(playeraccount, "s.weap1") local weap2 = getAccountData(playeraccount, "s.weap2") local ammo2 = getAccountData(playeraccount, "s.ammo2") local weap3 = getAccountData(playeraccount, "s.weap3") local ammo3 = getAccountData(playeraccount, "s.ammo3") local weap4 = getAccountData(playeraccount, "s.weap4") local ammo4 = getAccountData(playeraccount, "s.ammo4") local weap5 = getAccountData(playeraccount, "s.weap5") local ammo5 = getAccountData(playeraccount, "s.ammo5") local weap6 = getAccountData(playeraccount, "s.weap6") local ammo6 = getAccountData(playeraccount, "s.ammo6") local weap7 = getAccountData(playeraccount, "s.weap7") local ammo7 = getAccountData(playeraccount, "s.ammo7") local weap8 = getAccountData(playeraccount, "s.weap8") local ammo8 = getAccountData(playeraccount, "s.ammo8") local weap9 = getAccountData(playeraccount, "s.weap9") local ammo9 = getAccountData(playeraccount, "s.ammo9") local weap10 = getAccountData(playeraccount, "s.weap10") local weap11 = getAccountData(playeraccount, "s.weap11") local weap12 = getAccountData(playeraccount, "s.weap12") giveWeapon ( source, weap0, 1 ) giveWeapon ( source, weap1, 1 ) giveWeapon ( source, weap2, ammo2 ) giveWeapon ( source, weap3, ammo3 ) giveWeapon ( source, weap4, ammo4 ) giveWeapon ( source, weap5, ammo5 ) giveWeapon ( source, weap6, ammo6 ) giveWeapon ( source, weap7, ammo7 ) giveWeapon ( source, weap8, ammo8 ) giveWeapon ( source, weap9, ammo9 ) giveWeapon ( source, weap10, 1 ) giveWeapon ( source, weap11, 1 ) giveWeapon ( source, weap12, 1 ) end end ) addEventHandler('onPlayerQuit',root, function() local account = getPlayerAccount(source) local team = getPlayerTeam(source) if not isGuestAccount(account) then if team and isElement(team) then setAccountData(account,'team',getTeamName(team)) end end end ) addEventHandler('onPlayerWaste',root, function() local account = getPlayerAccount(source) local team = getPlayerTeam(source) if not isGuestAccount(account) then if team and isElement(team) then setAccountData(account,'team',getTeamName(team)) end end end addEventHandler('onPlayerLogin',root, function(_,account) local teamName = getAccountData(account,'team') if teamName then local team = getTeamFromName(teamName) if team and isElement(team) then setPlayerTeam(source,team) end end end )
-
I have this script that i just made. For some reason when someone hits the pickup, it will not give it to them. It will just go away and respawn. Help me please. swat_m4 = createPickup ( 2563.6943359375, -1297.4033203125, 1031.421875, 3, 356, 1, 5000 ) setElementInterior(swat_m4,2)
-
function givecash(thePlayer, command, who, amount) local noobwiegeldkrijgt = getPlayerFromName ( who ) local noobdiegeldgeeft = getPlayerFromName ( thePlayer ) if ( tonumber ( amount ) < 0 ) then return end if (getPlayerMoney(thePlayer) >= amount) then givePlayerMoney (noobwiegeldkrijgt, math.abs(tonumber(amount))) takePlayerMoney (thePlayer, math.abs(tonumber(amount))) else outputChatBox("Sorry, You Do Not Have That Much Money To Give.", thePlayer, 255, 0, 0 ) end end addCommandHandler ("give", givecash)
-
Humm... Command will not work
-
I have this command ( /give and /pay ) but i dont know how to make it so that the player sending money haves to have the amount of money that there sending. Like, i dont want sender want to be able to go in negative money. function givecash(thePlayer, command, who, amount) local noobwiegeldkrijgt = getPlayerFromName ( who ) local noobdiegeldgeeft = getPlayerFromName ( thePlayer ) if (getPlayerMoney(thePlayer) >= amount) then givePlayerMoney (noobwiegeldkrijgt, math.abs(tonumber(amount))) takePlayerMoney (thePlayer, math.abs(tonumber(amount))) else outputChatBox("Sorry, You Do Not Have That Much Money To Give.", thePlayer, 255, 0, 0 ) end end addCommandHandler ("give", givecash) addCommandHandler ("pay", givecash)
-
Hey guys, when ever i map then save, and restart the server nothing that has to do with my map will spawn. No marker, blips, vehciles, or objects. Please how do i fix this bug?
-
local myMarker = createMarker(1882.3262939453, -1314.8422851563, 14.500373840332, 'cylinder', 2.0, 255, 0, 0, 150) function markerhit( hitPlayer, matchingDimension ) if (not isPedInVehicle(hitPlayer)) then setElementPosition ( hitPlayer, 0, 0, 0 ) end end addEventHandler( "onMarkerHit", myMarker, markerhit )
-
Hey, how do i stop object 1423 ( ) for falling over when somone hits it?
-
Hey, i have a script that i just made... For some reason it will not come out in green, it comes out in that default tan color. And i am not sure how to make it so that if the player dose not have $300 it wont work. It just goes into negative, and i dont wont that. function ads(player,...) local text = table.concat({...}, " ") outputChatBox("Advertisment: ".. text .."!", 0, 100, 0) takePlayerMoney(player, 300) end addCommandHandler("ad", ads)
-
Hi, i have this save system script. I scripted in the team save but it wont work, any help? function onPlayerQuit ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local x,y,z = getElementPosition (source) setAccountData ( playeraccount, "s.HandMoney", getPlayerMoney ( source ) ) setAccountData (playeraccount, "s.skin", tostring (getPedSkin (source))) setAccountData (playeraccount, "s.x", x) setAccountData (playeraccount, "s.y", y) setAccountData (playeraccount, "s.z", z) setAccountData (playeraccount, "s.int", getElementInterior (source)) setAccountData (playeraccount, "s.dim", getElementDimension (source)) setAccountData (playeraccount, "s.rot", getPlayerRotation (source)) setAccountData (playeraccount, "s.weap0", getPedWeapon ( source, 0 )) setAccountData (playeraccount, "s.weap1", getPedWeapon ( source, 1 )) setAccountData (playeraccount, "s.weap2", getPedWeapon ( source, 2 )) setAccountData (playeraccount, "s.ammo2", getPedTotalAmmo ( source, 2 )) setAccountData (playeraccount, "s.weap3", getPedWeapon ( source, 3 )) setAccountData (playeraccount, "s.ammo3", getPedTotalAmmo ( source, 3 )) setAccountData (playeraccount, "s.weap4", getPedWeapon ( source, 4 )) setAccountData (playeraccount, "s.ammo4", getPedTotalAmmo ( source, 4 )) setAccountData (playeraccount, "s.weap5", getPedWeapon ( source, 5 )) setAccountData (playeraccount, "s.ammo5", getPedTotalAmmo ( source, 5 )) setAccountData (playeraccount, "s.weap6", getPedWeapon ( source, 6 )) setAccountData (playeraccount, "s.ammo6", getPedTotalAmmo ( source, 6 )) setAccountData (playeraccount, "s.weap7", getPedWeapon ( source, 7 )) setAccountData (playeraccount, "s.ammo7", getPedTotalAmmo ( source, 7 )) setAccountData (playeraccount, "s.weap8", getPedWeapon ( source, 8 )) setAccountData (playeraccount, "s.ammo8", getPedTotalAmmo ( source, 8 )) setAccountData (playeraccount, "s.weap9", getPedWeapon ( source, 9 )) setAccountData (playeraccount, "s.ammo9", getPedTotalAmmo ( source, 9 )) setAccountData (playeraccount, "s.weap10", getPedWeapon ( source, 10 )) setAccountData (playeraccount, "s.weap11", getPedWeapon ( source, 11 )) setAccountData (playeraccount, "s.weap12", getPedWeapon ( source, 12 )) end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) local root = getRootElement() addEventHandler("onPlayerLogin", root, function() local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local playermoney = getAccountData ( playeraccount, "s.HandMoney" ) if ( playermoney ) then setPlayerMoney ( source, playermoney ) end local playerInt = getAccountData (playeraccount, "s.int") local playerDim = getAccountData (playeraccount, "s.dim") local playerSkin = getAccountData (playeraccount, "s.skin") local playerX = getAccountData (playeraccount, "s.x") local playerY = getAccountData (playeraccount, "s.y") local playerZ = getAccountData (playeraccount, "s.z") local playerRot = getAccountData (playeraccount, "s.rot") spawnPlayer(source, playerX, playerY, playerZ, playerRot, playerSkin, playerInt, playerDim) fadeCamera (source, true) setCameraTarget (source, source) local weap0 = getAccountData(playeraccount, "s.weap0") local weap1 = getAccountData(playeraccount, "s.weap1") local weap2 = getAccountData(playeraccount, "s.weap2") local ammo2 = getAccountData(playeraccount, "s.ammo2") local weap3 = getAccountData(playeraccount, "s.weap3") local ammo3 = getAccountData(playeraccount, "s.ammo3") local weap4 = getAccountData(playeraccount, "s.weap4") local ammo4 = getAccountData(playeraccount, "s.ammo4") local weap5 = getAccountData(playeraccount, "s.weap5") local ammo5 = getAccountData(playeraccount, "s.ammo5") local weap6 = getAccountData(playeraccount, "s.weap6") local ammo6 = getAccountData(playeraccount, "s.ammo6") local weap7 = getAccountData(playeraccount, "s.weap7") local ammo7 = getAccountData(playeraccount, "s.ammo7") local weap8 = getAccountData(playeraccount, "s.weap8") local ammo8 = getAccountData(playeraccount, "s.ammo8") local weap9 = getAccountData(playeraccount, "s.weap9") local ammo9 = getAccountData(playeraccount, "s.ammo9") local weap10 = getAccountData(playeraccount, "s.weap10") local weap11 = getAccountData(playeraccount, "s.weap11") local weap12 = getAccountData(playeraccount, "s.weap12") giveWeapon ( source, weap0, 1 ) giveWeapon ( source, weap1, 1 ) giveWeapon ( source, weap2, ammo2 ) giveWeapon ( source, weap3, ammo3 ) giveWeapon ( source, weap4, ammo4 ) giveWeapon ( source, weap5, ammo5 ) giveWeapon ( source, weap6, ammo6 ) giveWeapon ( source, weap7, ammo7 ) giveWeapon ( source, weap8, ammo8 ) giveWeapon ( source, weap9, ammo9 ) giveWeapon ( source, weap10, 1 ) giveWeapon ( source, weap11, 1 ) giveWeapon ( source, weap12, 1 ) end end ) addEventHandler('onPlayerQuit',root, function() local account = getPlayerAccount(source) local team = getPlayerTeam(source) if not isGuestAccount(account) then if team and isElement(team) then setAccountData(account,'team',getTeamName(team)) end end end ) addEventHandler('onPlayerLogin',root, function(_,account) local teamName = getaccountdata(account,'team') if teamName then local team = getTeamFromName(teamName) if team and isElement(team) then setPlayerTeam(source,team) end end end )
-
How can i make it so when someone enters the these ColShapes they have godmode, and godmode disables when the exit? -- Hosp By LSPD local hillArea1 = createColRectangle ( 1150.15234375,-1393.5898437, 100, 100 ) local radar1 = createRadarArea ( 1150.15234375,-1393.5898437, 100, 100, 0, 255, 0, 200 ) function hill_Enter ( thePlayer, matchingDimension ) local playerX, playerY, playerZ = getElementPosition ( thePlayer ) local playerZoneName = getZoneName ( playerX, playerY, playerZ ) if (getElementType(thePlayer) == "player") then outputChatBox( "You have entered the ".. playerZoneName .." Safe Zone!", thePlayer, 0, 255, 0 ) setRadarAreaFlashing ( radar1, false ) end end addEventHandler ( "onColShapeHit", hillArea1, hill_Enter ) function hill_Exit ( thePlayer, matchingDimension ) local playerX, playerY, playerZ = getElementPosition ( thePlayer ) local playerZoneName = getZoneName ( playerX, playerY, playerZ ) if (getElementType(thePlayer) == "player") then if isPedDead ( thePlayer ) ~= true then outputChatBox( "You have left the ".. playerZoneName .." Safe Zone!", thePlayer, 255, 0, 0 ) setRadarAreaFlashing ( radar1, false ) end end end addEventHandler ( "onColShapeLeave", hillArea1, hill_Exit ) -- Hosp By CJ's House local hillArea2 = createColRectangle ( 1996.712890625,-1451.391601562, 110, 100 ) local radar2 = createRadarArea ( 1991.812890625,-1456.391601562, 110, 100, 0, 255, 0, 200 ) function hill_Enter_1 ( thePlayer, matchingDimension ) local playerX, playerY, playerZ = getElementPosition ( thePlayer ) local playerZoneName = getZoneName ( playerX, playerY, playerZ ) if (getElementType(thePlayer) == "player") then outputChatBox( "You have entered the ".. playerZoneName .." Safe Zone!", thePlayer, 0, 255, 0 ) setRadarAreaFlashing ( radar2, false ) end end addEventHandler ( "onColShapeHit", hillArea2, hill_Enter_1 ) function hill_exit_1 ( thePlayer, matchingDimension ) local playerX, playerY, playerZ = getElementPosition ( thePlayer ) local playerZoneName = getZoneName ( playerX, playerY, playerZ ) if (getElementType(thePlayer) == "player") then if isPedDead ( thePlayer ) ~= true then outputChatBox( "You have left the ".. playerZoneName .." Safe Zone!", thePlayer, 255, 0, 0 ) setRadarAreaFlashing ( radar2, false ) end end end addEventHandler ( "onColShapeLeave", hillArea2, hill_exit_1 )
-
Dude, use map editor ( /start editor )
-
Hey guys, i have two problems with my script. 1. For some weird reason it dosn't come out in color. 2. Im not sure how to make it only viewable to teams Staff, Police, Military, Swat function PRbackup(player,cmd) local nick=getPlayerName(player) local name = getTeamName(getPlayerTeam(player)) if ( name == "Police" ) or ( name == "Staff" ) or ( name == "Military" ) or ( name == "SWAT" ) then outputChatBox("Police Dispatch: "..nick.." Needs Backup!",0,0,255) end end addCommandHandler("backup", PRbackup) function PRAir(player,cmd) local nick=getPlayerName(player) local name = getTeamName(getPlayerTeam(player)) if ( name == "Police" ) or ( name == "Staff" ) or ( name == "Military" ) or ( name == "SWAT" ) then outputChatBox("Police Dispatch: "..nick.." Air Support!",0,0,255) end end addCommandHandler("requestair", PRAir) function PRMili(player,cmd) local nick=getPlayerName(player) local name = getTeamName(getPlayerTeam(player)) if ( name == "Police" ) or ( name == "Staff" ) or ( name == "Military" ) or ( name == "SWAT" ) then outputChatBox("Police Dispatch: "..nick.." Military Support!",0,0,255) end end addCommandHandler("requestmilitary", PRMili) function PRSWAT(player,cmd) local nick=getPlayerName(player) local name = getTeamName(getPlayerTeam(player)) if ( name == "Police" ) or ( name == "Staff" ) or ( name == "Military" ) or ( name == "SWAT" ) then outputChatBox("Police Dispatch: "..nick.." SWAT Support!",0,0,255) end end addCommandHandler("requestswat", PRSWAT)
-
hey, i have this script to create my swat rope, but when i type /sr nothing happens. Please help CMD_SWATROPE = "sr" function createSwatRope(player) if isPedInVehicle(player) then local myVehicle = getPedOccupiedVehicle(player) if getVehicleName(myVehicle) == "Police Maverick" then local x,y,z = getElementPosition(myVehicle) createSWATRope(x, y, z, 10000) else outputChatBox("Enter Police Maverick!", player, 255, 0, 0) end else outputChatBox("Enter Police Maverick!", player, 255, 0, 0) end end addCommandHandler(CMD_SWATROPE, createSwatRope)