Jump to content

GanJaRuleZ

Members
  • Posts

    298
  • Joined

  • Last visited

Everything posted by GanJaRuleZ

  1. safecol = createColCuboid ( 95.974617004395, 1751.3895263672, 17.640625, 153, 0, 0 ) safeZoneRadar = createRadarArea ( 95.974617004395, 1751.3895263672, 255, 255, 153, 0, 0 ) setElementData (safeZoneRadar, "zombieProof", true) setElementAlpha(safeZoneRadar, 0) function enterZone(hitPlayer,thePlayer) local skin = getElementModel (hitPlayer) if ( skin == 287 ) then toggleControl (hitPlayer, "fire", true ) toggleControl (hitPlayer, "aim_weapon", true) toggleControl (hitPlayer, "vehicle_fire", true) outputChatBox("", hitPlayer, 0, 255, 0) else killPed (hitPlayer) end end addEventHandler( "onColShapeHit", safecol, enterZone ) function leaveZone(hitPlayer,thePlayer) local skin = getElementModel (hitPlayer) toggleControl (hitPlayer, "fire", true) toggleControl (hitPlayer, "aim_weapon", true) toggleControl (hitPlayer, "vehicle_fire", true) outputChatBox("", hitPlayer, 255, 0, 0) if not ( skin == 287 ) then killPed (hitPlayer) end end addEventHandler( "onColShapeLeave", safecol, leaveZone ) Did you even searched on the wiki? [url=https://wiki.multitheftauto.com/wiki/SetElementAlpha]https://wiki.multitheftauto.com/wiki/SetElementAlpha[/url]
  2. It don't works , but thanks anyway
  3. Hey allz , i've got a problem Here is the script function mission1Marker(theMarker,matchingDimension) local theMarker = createMarker ( 2467.8647460938, -1648.7094726563, 12.47255897522, "cylinder", 1, 255, 255, 0, 170 ) if (matchingDimension) then triggerClientEvent ( "showMission1", getRootElement() ) end end addEventHandler("onPlayerMarkerHit",getRootElement(),mission1Marker) addEvent("rejectTheMission", true) addEventHandler("rejectTheMission", thePlayer, unshowMission1) function() triggerClientEvent ( "unshowMission1", thePlayer ) end ) addEvent("acceptTheMission", true) addEventHandler("acceptTheMission , thePlayer, unshowMission1) function() triggerClientEvent ( "unshowMission1", thePlayer ) end ) The error is : Mission\Mission1_s.lua:13: '<name>' expected near '(' Thanks in advance
  4. Back again on the topic... At the first test , it seems that it doesen't saves the data , can anyone help?
  5. Are you a noob or something ? Just try that script -.-'
  6. exports.scoreboard:addScoreboardColumn('Rank',getRootElement(),3,30,'Rank') levels = { ["Rank/1.png"] = 1, ["Rank/2.png"] = 2, ["Rank/3.png"] = 3 } function scoreRank() local account = getPlayerAccount(source) livello = getAccountData(account, "rank") if livello == false then for i,v in pairs(levels) do if livello == i then end end end setElementData(source, "Rank", ":Panel\\Rank\\".. livello ..".png") end addEventHandler('onPlayerSpawn',Root,scoreRank) And rename the 3 files into 1 , 2 , and 3 The level is saved as "number" not as "level"
  7. I don't think they changed something o.0 Just put your code here or check out the HEX ...
  8. You want just for yourself or for everyone? If just for yourself you can simply use PGUP and PGDOWN ... OR Press F8 and scroll up.
  9. 1. You didn't create the checkpoint 2. You can simply make a marker o.0 local boatMarker = createMarker( x, y, z, 'cylinder', 2.0, 255, 0, 0, 150) function MarkerHit( hitElement, matchingDimension ) local randomboats = math.random(454, 472) if ( isPedInVehicle ( source ) ) then setElementModel ( getPedOccupiedVehicle (source), randomboats ) end end ) addEventHandler( "onMarkerHit", boatMarker, MarkerHit )
  10. Sure i need the table Type: local levels = { 1 = "level1.png", 2= "level2.png" etc. . . + setElementData(source, "Rank", ":folder with images".. levels ..".png") Actually , the levels are saved as numbers not as level1 and level2 and etc So you can simply write local levels = { 1 = "1.png" 2 = "2.png" ... 99 = "99.png" } setElementData(source, "rank", "images\".. levels ..".png") And don't forget that the element is "rank" not "Rank" Good Luck
  11. Heh , wtf do you mean ? If you can explain , do it...
  12. As far i see , you save the data on the account . You can have 100 nicknames and 1 account , but not 100 accounts and 1 nickname , so Try to /logout , /login
  13. exports.scoreboard:addScoreboardColumn('Rank') function scoreLevel ( thePlayer ) local level = getAccountData( thePlayer, "rank") if rank== false then setElementData ( source, "rank", "0" ) --Show the image for guest players else setElementData ( source, "rank", level ) --Show the images rank end addEventHandler ( "onPlayerSpawn", getRootElement(), scoreLevel ) function showTheRank() local level = getElementData ( thePlayer , "rank" ) dxDrawText( ".. level ..",sx*(0.3568),sy*(0.8074),sx*(0.2203),sy*(0.130), tocolor ( 192,192,192,255 ), 1.15, "default-bold","left","top", false, false ,true ) end bindKey ("F2", "down", showTheRank) NOT TESTED! EDIT: If you want to use images use guiCreateStaticImage EXAMPLE guiCreateStaticImage( x, y, width , heigh, "name.png", false ) -- it hasn't any parents .. guiCreateStaticImage( x, y, width , heigh, "name.png", myGuiWindow ) -- It will be shown only if "myGuiWindow" is visibile
  14. 1. I didn't wrote somewhere that that is my script. 2. I found it accidentaly on my friend's computer ( via TeamViewer ) , so i don't know to who to give the credits @QuantumZ : That is to restrict the player to roll , 30000 = 30 sec , so he has to wait 30 secs to roll another time @Solidsnake14: Yeah i forgot something , thx
  15. Huh , he wants to add it in the scoreboard .. Just look there @Edit : Whatever ..
  16. ClientSide ( by me ) function Columns() exports.scoreboard:scoreboardAddColumn("TimePlayed") setElementData(localPlayer,"TimePlayed",0) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), Columns) ServerSide (by Xeno) function addASecond() local serial = getPlayerSerial(player) local oldData = executeSQLSelect( "TimePlayed", "TimePlayed","serial = '" .. serial .. "'") newData = tonumber(oldData[1]["TimePlayed"]) + 1 setElementData(player,"TimePlayed",tonumber(getElementData(player,"TimePlayed"))+1) executeSQLUpdate ( "TimePlayed", "TimePlayed = '"..newData.."'","serial = '" .. serial .. "'") end end end addEventHandler ( "onClientRender", getRootElement(), addASecond)
  17. Its still bugged , but i fixed it , adding an end to the end of the script btw i tried to change them to false and still didnt works... ( the labels ... ) Window = {} TabPanel = {} Tab = {} Label = {} userPanelWindow = guiCreateWindow(98,223,436,291,"@@@@ UserPanel",false) TabPanel = guiCreateTabPanel(9,21,263,29,false,userPanelWindow) local tab1 = guiCreateTab("User",TabPanel) local tab2 = guiCreateTab("Crew",TabPanel) local tab3 = guiCreateTab("Map",TabPanel) local tab4 = guiCreateTab("@@@@",TabPanel) local tab5 = guiCreateTab("Credits",TabPanel) image1 = guiCreateStaticImage(224,56,201,197,"images/title.png",false,tab1) label1 = guiCreateLabel(11,69,189,17,"Name :",false,tab1) label2 = guiCreateLabel(10,95,167,17,"Total Wins :",false,tab1) label3 = guiCreateLabel(8,120,209,21,"Total Loses :",false,tab1) label4 = guiCreateLabel(10,256,418,17,"Serial :",false,tab1) label5 = guiCreateLabel(17,67,101,16,"@@@@",false,tab2) label6 = guiCreateLabel(23,105,90,15,"@@@@",false,tab2) label7 = guiCreateLabel(23,126,80,14,"@@@@",false,tab2) label8 = guiCreateLabel(23,146,101,17,"@@@@",false,tab2) label9 = guiCreateLabel(23,168,107,15,"@@@@",false,tab2) label10 = guiCreateLabel(23,191,80,14,"@@@@",false,tab2) label11 = guiCreateLabel(23,213,80,14,"@@@@",false,tab2) label12 = guiCreateLabel(22,234,80,14,"@@@@",false,tab2) label13 = guiCreateLabel(22,258,80,14,"@@@@",false,tab2) label14 = guiCreateLabel(177,69,82,16,"@@@@",false,tab2) label15 = guiCreateLabel(170,99,85,17,"@@@@",false,tab2) label16 = guiCreateLabel(328,71,93,17,"@@@@",false,tab2) label17 = guiCreateLabel(325,100,108,18,"@@@@",false,tab2) label18 = guiCreateLabel(323,123,109,17,"@@@@",false,tab2) function onresourceStart () bindKey ("F7", "down", showUserPanel) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onresourceStart) function showUserPanel () getVisible = guiGetVisible (userPanelWindow) if (getVisible == true) then guiSetVisible (userPanelWindow, false) showCursor (false) else if (getVisible == false) then guiSetVisible (userPanelWindow, true) showCursor (true) local serial = getPlayerSerial(getLocalPlayer()) local wins = getElementData(getLocalPlayer(), "RaceWins") local loses = getElementData(getLocalPlayer(), "RaceLoses") local playerName = getPlayerName(getLocalPlayer()) if loses and wins then guiSetText ( label1, "Name: " .. playerName .. " " ) guiSetText ( label2, "Total Wins:" .. wins .. " " ) guiSetText ( label3, "Total Loses: " .. loses .. " " ) guiSetText ( label4, "Serial : " .. serial .. " " ) else guiSetText ( label2, "Total Wins: 0 " ) guiSetText ( label3, "Total Loses: 0 " ) end end end end This is the new script , the labels arent visibile -.-' , so can anyone help me? Thanks in advance
  18. How to make a roll script like in DDC , i bet that many of you wanted it So lets stars THIS SCRIPT ISN'T MINE! restriction = {} --We will need to add restrictions addCommandHandler("roll", --We add a commandHandler here function(thePlayer) --We start a new function end -- We end the function ) -- We close the commandHandler After we will need to get the player restriction = {} --We will need to add restrictions addCommandHandler("roll", --We add a commandHandler here function(thePlayer) --We start a new function local playerName = getPlayerName(thePlayer) -- We will get the player if restriction[playerName] then -- We get , if the player has restricion to Roll else outputChatBox("You have to wait 30 seconds", thePlayer, 255, 0, 0) -- We print in chat that he needs to wait 30 secs else restriction[playerName] = true -- If he isnt restrictionated setTimer(restrictionEnd, 30000, 1, playerName) -- 30 Secs to the restriction to end randomroll = math.random(1, 3000) -- It writes a number between 1 and 3000 ( you can edit it ) roller = math.random(1, 4) -- It writes a number between 1 and 4 ( not recomended to edit ) if roller == 1 then -- If its 1 givePlayerMoney(thePlayer, randomroll) -- It gives the player money outputChatBox(playerName .. ' roll and wins ' .. randomroll .. ' !', getRootElement(), 255, 255, 0) -- It writes in chat the win elseif roller == 2 then -- If its 2 takePlayerMoney(thePlayer, randomroll) -- It takes the player money outputChatBox(playerName .. ' roll and losses ' .. randomroll .. ' !', getRootElement(), 255, 255, 0) -- It writes in the chat the lose elseif roller == 3 then -- If its 3 setPlayerMuted(thePlayer, true) --It mutes it setTimer(setPlayerMuted, 30000, 1, thePlayer, false) -- We determine the time outputChatBox(playerName .. ' roll and is now muted !', getRootElement(), 255, 255, 0) -- It writes in the chat the mute elseif roller == 4 then -- If its 4 setSkyGradient(math.random(1, 255) ,math.random(1, 255) ,math.random(1, 255) ,math.random(1, 255) ,math.random(1, 255) ,math.random(1, 255)) -- Then it changes the sky colour outputChatBox(playerName .. ' roll and is now changed the sky colour !', getRootElement(), 255, 255, 0) -- It writes the change in the chat end -- End end -- End end -- We end the function ) -- We close the commandHandler function restrictionEnd(playerName) restriction[playerName] = nil end
  19. @Perfect .. You must know that from now , you must try to script , we won't make all the scripts at command
  20. 1) What? 2) Client side is the script that the player will download and Server side is the script that will be just in the server's folder 3) You have to script yourself 4) Yes you can , by editing the .dff and the .txd '5) Country Tab , in the public resources 6) function onresourceStart () bindKey ("F7", "down", suddenlyStop) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onresourceStart) function suddenlyStop(theplayer) local vehicle = getPedOccupiedVehicle(thePlayer) if (not vehicle) then return end local speedx, speedy, speedz = getElementVelocity ( vehicle ) setElementVelocity ( vehicle , 0 , 0 , 0 ) end end Im new too in script , so i dont know if this works I hope i helped you ...
  21. I don't make scripts at command lol , you have to script it yourself I gaved you an example!
  22. Still invisibile Can anyone help me?
  23. Ok , there aren't errors , but the labels are still invisibile Thank you in advance
×
×
  • Create New...