Jump to content

Nec

Members
  • Posts

    12
  • Joined

  • Last visited

Everything posted by Nec

  1. Nec

    drop all the money!

    =\ i just need make a pickup on the dead body of his money.. and the player lose all he money
  2. Nec

    drop all the money!

    =\ i just need make a pickup on the dead body of his money.. and the player lose all he money
  3. bool setPlayerMoney (int amount ) function setCash ( thePlayer, command, amount ) setPlayerMoney ( thePlayer, tonumber(amount) ) addCommandHandler ( "dardinero", setCash ) i need a script to drop all the money on your hand like a rpg
  4. Nec

    drop all the money!

    bool setPlayerMoney (int amount ) function setCash ( thePlayer, command, amount ) setPlayerMoney ( thePlayer, tonumber(amount) ) addCommandHandler ( "dardinero", setCash ) i need a script to drop all the money on your hand like a rpg
  5. Nec

    HELP | Spawn WINDOW.

    i need the server side =\
  6. Nec

    HELP | Spawn WINDOW.

    what's that? what are you talking about?
  7. Nec

    HELP | Spawn WINDOW.

    i make this with my inteligence
  8. today i make this spawngui, so i need meta.xml file i dont know client waddEvent("login", true) p = getLocalPlayer() x,y,z = 1953, 1343, 24 local sin, cos, pi, rad, r, lp = math.sin, math.cos, math.pi, math.rad, 0, getLocalPlayer() local theta = rad(0) --height local distance = 19 -- default distance from the player function render() if not rotatingCamIsEnabled then return end r = r + 0.5 -- rot speed if r >= 360 then r = 0 end local phi=rad® local camX = x + 3*distance*cos(phi)*cos(theta) local camY = y + 3*distance*sin(phi)*cos(theta) local camZ = z + 0.4*distance + 2*distance*sin(theta) local hit, hitX, hitY, hitZ = processLineOfSight(x, y, z, camX, camY, camZ, false, false, false) if hit then camX, camY, camZ = x + 0.9*(hitX-x), y + 0.9*(hitY-y), z + 0.9*(hitZ-z) end setCameraMatrix(camX,camY,camZ,x,y,z) end function start () addrender() x,y,z = 1953, 1343, 24 theta = rad(0) --height distance = 19 showPlayerHudComponent ("area_name", false ) showPlayerHudComponent ("radar", true ) rotatingCamIsEnabled=true setElementInterior(p,0) local cxml = xmlLoadFile( "hep.xml" ) local ccontent = xmlNodeGetValue( cxml ) local screenWidth, screenHeight = guiGetScreenSize() gamemm = guiCreateWindow((screenWidth - 155) / 1.5, (screenHeight - -435)/80,380,345,"Select Team",false,nil) guiWindowSetSizable(gamemm,false) guiWindowSetMovable(gamemm,false) guiSetVisible(gamemm,false) tabPanel = guiCreateTabPanel ( 14, 56, 348, 313, false, gamemm ) teams = guiCreateTab( "Teams", tabPanel ) hel = guiCreateTab( "Help", tabPanel ) memohelp = guiMemoSetReadOnly(guiCreateMemo(0.0232,0.0300,0.955,0.93,ccontent,true,hel) ,true) guiSetAlpha(memohelp,0.5) guiLabelSetVerticalAlign(madebyteam1,"top") guiLabelSetHorizontalAlign(madebyteam1,"right",false) guiSetFont(madebyteam1,"clear-normal") guiLabelSetColor(madebyteam1, 255,255,0) gridls = guiCreateGridList(0.03,0.05,0.4,0.9,true,teams) guiGridListSetSelectionMode(gridls,2) local ls = guiGridListAddColumn(gridls,"Teams",0. refreshTheTeams() okbtn = guiCreateButton(0.6063,0.8906,0.25,0.1016,"Spawn",true,teams) guiSetProperty( okbtn, "HoverTextColour", "FF0064FF" ) weapon1 = guiCreateLabel(0.5095,0.0898,0.326,0.0794,"Weapons:",true,teams) guiLabelSetVerticalAlign(weapon1,"center") guiLabelSetHorizontalAlign(weapon1,"center",false) guiSetFont(weapon1,"clear-normal") weapon2 = guiCreateLabel(0.5095,0.1836,0.326,0.0794,"",true,teams) guiLabelSetVerticalAlign(weapon2,"center") guiLabelSetHorizontalAlign(weapon2,"center",false) guiSetFont(weapon2,"clear-normal") weapon3 = guiCreateLabel(0.5032,0.25,0.326,0.0794,"",true,teams) guiLabelSetVerticalAlign(weapon3,"center") guiLabelSetHorizontalAlign(weapon3,"center",false) guiSetFont(weapon3,"clear-normal") weapon4 = guiCreateLabel(0.5158,0.3164,0.326,0.0794,"",true,teams) guiLabelSetVerticalAlign(weapon4,"center") guiLabelSetHorizontalAlign(weapon4,"center",false) guiSetFont(weapon4,"clear-normal") weapon5 = guiCreateLabel(0.5,0.3828,0.326,0.0794,"",true,teams) guiLabelSetVerticalAlign(weapon5,"center") guiLabelSetHorizontalAlign(weapon5,"center",false) guiSetFont(weapon5,"clear-normal") weapon6 = guiCreateLabel(0.5063,0.4375,0.326,0.0794,"",true,teams) guiLabelSetVerticalAlign(weapon6,"center") guiLabelSetHorizontalAlign(weapon6,"center",false) guiSetFont(weapon6,"clear-normal") weapon7 = guiCreateLabel(0.5127,0.5469,0.326,0.0794,"",true,teams) guiLabelSetVerticalAlign(weapon7,"center") guiLabelSetHorizontalAlign(weapon7,"center",false) guiSetFont(weapon7,"clear-normal") weapon8 = guiCreateLabel(0.5316,0.6133,0.326,0.0794,"",true,teams) guiLabelSetVerticalAlign(weapon8,"center") guiLabelSetHorizontalAlign(weapon8,"center",false) guiSetFont(weapon8,"clear-normal") weapon9 = guiCreateLabel(0.55,0.65,0.326,0.0794,"",true,teams) guiLabelSetVerticalAlign(weapon9,"center") guiLabelSetHorizontalAlign(weapon9,"center",false) guiSetFont(weapon9,"clear-normal") if okbtn then addEventHandler ( "onClientGUIClick", okbtn, spawnteam,false ) end if gridls then addEventHandler ( "onClientGUIDoubleClick", gridls, spawnteam,false ) addEventHandler ( "onClientGUIClick", gridls, camera,false ) end end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()), start) function gamembox () setTimer(setElementInterior,5000,1,lp,0) setTimer(setElementDimension,5000,1,lp,0) setTimer(guiSetVisible,5000,1,gamemm,true) x,y,z = 1953, 1343, 24 theta = rad(0) --height distance = 19 showPlayerHudComponent ("radar", false ) rotatingCamIsEnabled=true setTimer(showCursor,5000,1,true) setTimer(addrender,5000,1) end function addrender() removeEventHandler("onClientRender", getRootElement(), render) addEventHandler("onClientRender", getRootElement(), render) end function refreshTheTeams() local teams = { "medic", "SFPD", "FBI", "Lowrider", "Nostra", "Banditos", "[TD]", "Ballas", "Taxi SF", "Firefighter SF", "Pilot SF", "Bikini", "Admin", } local row = 0 for key, Teamname in ipairs (teams) do guiGridListAddRow ( gridls ) guiGridListSetItemText ( gridls, row, 1, Teamname, false, false ) row = row + 1 end end function spawnteam (button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clicked) local teamSelection = guiGridListGetItemText ( gridls, guiGridListGetSelectedItem ( gridls ), 1 ) setTimer (triggerServerEvent, 100, 1, "spawnteam", getLocalPlayer (), thisplayer, teamSelection ) guiSetVisible(gamemm,false) showCursor(false) rotatingCamIsEnabled=false showPlayerHudComponent ("radar", true ) removeEventHandler("onClientRender", getLocalPlayer(), render) end function fadeElement(guiElem, state2) if state2 == false then local currentAlpha = guiGetAlpha(guiElem ); local newAlpha = currentAlpha - 0.05; if newAlpha < 0.1 then newAlpha = 0.1; end guiSetAlpha( guiElem, newAlpha ); if newAlpha ~= 0.1 then setTimer( fadeElement, 50, 1,guiElem, state2 ); end elseif state2 == true then local currentAlpha = guiGetAlpha( guiElem ); local newAlpha = currentAlpha + 0.05; if newAlpha > 0.8 then newAlpha = 0.8 end guiSetAlpha( guiElem, newAlpha ); if newAlpha ~= 0.8 then setTimer( fadeElement, 50, 1,guiElem, state2 ); end end end function camera (button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clicked) if (guiGetAlpha(gamemm) > 0. then datimer = setTimer(fadeElement,5000,1,gamemm,true) fadeElement(gamemm,false) end local campos = guiGridListGetItemText ( gridls, guiGridListGetSelectedItem ( gridls ), 1 ) if campos =="LFPD" then guiSetText(weapon1,"Weapons:") guiSetText(weapon2,"Nightstick") guiSetText(weapon3,"Deagle") guiSetText(weapon4,"MP5") guiSetText(weapon5,"M4") guiSetText(weapon6,"Tear Gas") guiSetText(weapon7,"Spraycan") guiSetText(weapon8,"") guiSetText(weapon9,"") theta = rad(40) distance = 30 x,y,z = 1550,-1674,15 end if campos =="Nostra" then guiSetText(weapon1,"Weapons:") guiSetText(weapon2,"Brass Knuckles") guiSetText(weapon3,"Knife") guiSetText(weapon4,"Deagle") guiSetText(weapon5,"Uzi") guiSetText(weapon6,"AK-47") guiSetText(weapon7,"Molotov") guiSetText(weapon8,"Spraycan") guiSetText(weapon9,"") theta = rad(50) distance = 20 x,y,z = 1133, -2037, 69 end if campos =="Banditos" then guiSetText(weapon1,"Weapons:") guiSetText(weapon2,"Brass Knuckles") guiSetText(weapon3,"Knife") guiSetText(weapon4,"Deagle") guiSetText(weapon5,"Uzi") guiSetText(weapon6,"AK-47") guiSetText(weapon7,"Molotov") guiSetText(weapon8,"Spraycan") guiSetText(weapon9,"") theta = rad(50) distance = 20 x,y,z = 2781, -1613, 10 end if campos =="Warriors" then guiSetText(weapon1,"Weapons:") guiSetText(weapon2,"Brass Knuckles") guiSetText(weapon3,"Knife") guiSetText(weapon4,"Deagle") guiSetText(weapon5,"Uzi") guiSetText(weapon6,"AK-47") guiSetText(weapon7,"Molotov") guiSetText(weapon8,"Spraycan") guiSetText(weapon9,"") theta = rad(50) distance = 20 x,y,z = 1931, 695, 10 end if campos =="Yakuzza" then guiSetText(weapon1,"Weapons:") guiSetText(weapon2,"Brass Knuckles") guiSetText(weapon3,"Knife") guiSetText(weapon4,"Deagle") guiSetText(weapon5,"Uzi") guiSetText(weapon6,"AK-47") guiSetText(weapon7,"Molotov") guiSetText(weapon8,"Spraycan") guiSetText(weapon9,"") theta = rad(50) distance = 20 x,y,z = 2632, 1824, 11 end if campos =="Civilian" then guiSetText(weapon1,"Weapons:") guiSetText(weapon2,"Knife") guiSetText(weapon3,"Pistol") guiSetText(weapon4,"Uzi") guiSetText(weapon5,"M4") guiSetText(weapon6,"") guiSetText(weapon7,"") guiSetText(weapon8,"") guiSetText(weapon9,"") theta = rad(50) distance = 20 x,y,z = 427, 2531, 16 end if campos =="Taxi SF" then guiSetText(weapon1,"Weapons:") guiSetText(weapon2,"Deagle") guiSetText(weapon3,"Tec-9") guiSetText(weapon4,"Camera") guiSetText(weapon5,"") guiSetText(weapon6,"") guiSetText(weapon7,"") guiSetText(weapon8,"") guiSetText(weapon9,"") theta = rad(50) distance = 20 x,y,z = 1769,-1897,13 end if campos =="Lowrider" then guiSetText(weapon1,"Weapons:") guiSetText(weapon2,"Brass Knuckles") guiSetText(weapon3,"Knife") guiSetText(weapon4,"Deagle") guiSetText(weapon5,"Uzi") guiSetText(weapon6,"M4") guiSetText(weapon7,"Spraycan") guiSetText(weapon8,"Stachel Charges") guiSetText(weapon9,"") theta = rad(50) distance = 20 x,y,z = 2784, -2417, 13 end if campos =="medic" then guiSetText(weapon1,"Weapons:") guiSetText(weapon2,"Nightstick") guiSetText(weapon3,"Deagle") guiSetText(weapon4,"Stachel Charges") guiSetText(weapon5,"Spraycan") guiSetText(weapon6,"M4") guiSetText(weapon7,"") guiSetText(weapon8,"") guiSetText(weapon9,"") theta = rad(50) distance = 20 x,y,z = 1176, -1323, 14 end if campos =="Firefighter SF" then guiSetText(weapon1,"Weapons:") guiSetText(weapon2,"M4") guiSetText(weapon3,"Deagle") guiSetText(weapon4,"Grenade") guiSetText(weapon5,"Fire Extinguisher") guiSetText(weapon6,"") guiSetText(weapon7,"") guiSetText(weapon8,"") guiSetText(weapon9,"") theta = rad(50) distance = 40 x,y,z = 2038, -1409, 17 end if campos =="The Cobras" then guiSetText(weapon1,"Weapons:") guiSetText(weapon2,"Brass Knuckles") guiSetText(weapon3,"Knife") guiSetText(weapon4,"Deagle") guiSetText(weapon5,"Uzi") guiSetText(weapon6,"AK-47") guiSetText(weapon7,"Molotov") guiSetText(weapon8,"Spraycan") guiSetText(weapon9,"") theta = rad(50) distance = 20 x,y,z = 2640, 2325, 25 end if campos =="Trucker" then guiSetText(weapon1,"Weapons:") guiSetText(weapon2,"Deagle") guiSetText(weapon3,"M4") guiSetText(weapon4,"Grenade") guiSetText(weapon5,"Uzi") guiSetText(weapon6,"") guiSetText(weapon7,"") guiSetText(weapon8,"") guiSetText(weapon9,"") theta = rad(50) distance = 20 x,y,z = -186,-267,8 end if campos =="[TD]" then guiSetText(weapon1,"Weapons:") guiSetText(weapon2,"Brass Knuckles") guiSetText(weapon3,"katana") guiSetText(weapon4,"Deagle") guiSetText(weapon5,"M5") guiSetText(weapon6,"M4") guiSetText(weapon7,"grenade") guiSetText(weapon8,"Spraycan") guiSetText(weapon9,"") theta = rad(50) distance = 20 x,y,z = 2493,-1672,13 end if campos =="SWAT" then guiSetText(weapon1,"Weapons:") guiSetText(weapon2,"Knife") guiSetText(weapon3,"Deagle") guiSetText(weapon4,"MP5") guiSetText(weapon5,"M4") guiSetText(weapon6,"Sniper") guiSetText(weapon7,"Grenade/Teargas") guiSetText(weapon8,"Spraycan") guiSetText(weapon9,"Night-Vision/Infared Goggles") theta = rad(50) distance = 20 x,y,z = -2431, 523, 30 end if campos =="Ballas" then guiSetText(weapon1,"Weapons:") guiSetText(weapon2,"Brass Knuckles") guiSetText(weapon3,"Knife") guiSetText(weapon4,"Deagle") guiSetText(weapon5,"Uzi") guiSetText(weapon6,"AK-47") guiSetText(weapon7,"Molotov") guiSetText(weapon8,"Spraycan") guiSetText(weapon9,"") theta = rad(50) distance = 20 x,y,z = 1800,-2124, 13 end if campos =="Bikini Line" then guiSetText(weapon1,"Weapons:") guiSetText(weapon2,"Brass Knuckles") guiSetText(weapon3,"Knife") guiSetText(weapon4,"Deagle") guiSetText(weapon5,"Uzi") guiSetText(weapon6,"AK-47") guiSetText(weapon7,"Molotov") guiSetText(weapon8,"Spraycan") guiSetText(weapon9,"") theta = rad(50) distance = 20 x,y,z = 1219,-1811, 16.5 end if campos =="Tunestars" then guiSetText(weapon1,"Weapons:") guiSetText(weapon2,"Brass Knuckles") guiSetText(weapon3,"Knife") guiSetText(weapon4,"Deagle") guiSetText(weapon5,"Uzi") guiSetText(weapon6,"M4") guiSetText(weapon7,"Spraycan") guiSetText(weapon8,"Stachel Charges") guiSetText(weapon9,"") theta = rad(50) distance = 20 x,y,z = -1970,285, 40 end if campos =="FBI" then guiSetText(weapon1,"Weapons:") guiSetText(weapon2,"Knife") guiSetText(weapon3,"Deagle") guiSetText(weapon4,"MP5") guiSetText(weapon5,"M4") guiSetText(weapon6,"Sniper") guiSetText(weapon7,"Grenade/Teargas") guiSetText(weapon8,"Spraycan") guiSetText(weapon9,"Night-Vision/Infared Goggles") theta = rad(50) distance = 50 x,y,z = 1252, -1655, 12 end if campos =="Pilot SF" then guiSetText(weapon1,"Weapons:") guiSetText(weapon2,"Nightstick") guiSetText(weapon3,"Deagle") guiSetText(weapon4,"M4") guiSetText(weapon5,"Uzi") guiSetText(weapon6,"") guiSetText(weapon7,"") guiSetText(weapon8,"") guiSetText(weapon9,"") theta = rad(30) distance = 40 x,y,z = 1500, -2286, 35 end if campos =="V8 Club" then guiSetText(weapon1,"Weapons:") guiSetText(weapon2,"Brass Knuckles") guiSetText(weapon3,"Knife") guiSetText(weapon4,"Deagle") guiSetText(weapon5,"Uzi") guiSetText(weapon6,"M4") guiSetText(weapon7,"Spraycan") guiSetText(weapon8,"Stachel Charges") guiSetText(weapon9,"") theta = rad(50) distance = 20 x,y,z = -548, 2594,53 end if campos =="Admin" then guiSetText(weapon1,"Weapons:") guiSetText(weapon2,"Brass Knuckles") guiSetText(weapon3,"Knife") guiSetText(weapon4,"Deagle") guiSetText(weapon5,"Uzi") guiSetText(weapon6,"M4") guiSetText(weapon7,"Spraycan") guiSetText(weapon8,"Stachel Charges") guiSetText(weapon9,"") theta = rad(50) distance = 20 x,y,z = -548, 2594,53 end end addEventHandler ( "onClientPlayerWasted", getLocalPlayer(), gamembox ) addEvent("makeitagainvisible", true) function visibleagain() guiSetVisible(gamemm,true) addrender() showCursor(true) rotatingCamIsEnabled=true end addEventHandler("makeitagainvisible", getRootElement(), visibleagain) addEventHandler("login", getRootElement(),gamembox) function spawn() showPlayerHudComponent ("radar", true ) rotatingCamIsEnabled=false removeEventHandler("onClientRender", getLocalPlayer(), render) end addEventHandler("onClientPlayerSpawn", getLocalPlayer(), spawn) --speedometer updFreq = 50; function SpeedoVisible(val) guiSetVisible(lblVehName,val) guiSetVisible(lblKMH,val) guiSetVisible(lblMPH,val) guiSetVisible(lblHP,val) end addEventHandler ( "onClientResourceStart",getResourceRootElement(getThisResource()), function() sw,sh = guiGetScreenSize (); lblVehName = guiCreateLabel(13 / 800 * sw,420 / 600 * sh,209 / 800 * sw,38 / 600 * sh,"---",false) guiLabelSetVerticalAlign(lblVehName,"bottom") guiLabelSetHorizontalAlign(lblVehName,"center",false) guiSetFont(lblVehName,"sa-header") lblKMH = guiCreateLabel(160 / 800 * sw,459 / 600 * sh,92 / 800 * sw,19 / 600 * sh,"-- km/h",false) guiLabelSetVerticalAlign(lblKMH,"bottom") guiLabelSetHorizontalAlign(lblKMH,"left",false) guiSetFont(lblKMH,"default-bold-small") lblMPH = guiCreateLabel(175 / 800 * sw,483 / 600 * sh,90 / 800 * sw,18 / 600 * sh,"-- Mph",false) guiLabelSetVerticalAlign(lblMPH,"bottom") guiLabelSetHorizontalAlign(lblMPH,"left",false) guiSetFont(lblMPH,"default-bold-small") lblHP = guiCreateLabel(175 / 800 * sw,508 / 600 * sh,56 / 800 * sw,18 / 600 * sh,"--% HP",false) guiLabelSetVerticalAlign(lblHP,"bottom") guiLabelSetHorizontalAlign(lblHP,"left",false) guiSetFont(lblHP,"default-bold-small") lblLoc = guiCreateLabel(-21 / 800 * sw,572 / 600 * sh,278 / 800 * sw,19 / 600 * sh,"Somewhere Over The Rainbow",false) guiLabelSetVerticalAlign(lblLoc,"bottom") guiLabelSetHorizontalAlign(lblLoc,"center",false) guiSetFont(lblLoc,"default-bold-small") guiSetVisible(lblLoc,false) SpeedoVisible(false); speedoTmr = setTimer ( UpdateSpeedo, updFreq, 0 ); end ) function UpdateSpeedo() p = getLocalPlayer(); rx,ry,rz = getElementPosition (p); guiSetText(lblLoc, getZoneName(rx,ry,rz).." ( "..getZoneName(rx,ry,rz,true).." )" ) c = getPedOccupiedVehicle ( p ) if c == false then SpeedoVisible(false) return else SpeedoVisible(true) end vx,vy,vz = getElementVelocity© v = (vx^2 + vy^2 + vz^2)/ 3 * 1000 v = (v/500) * 260; -- Correction of speed, based on the RL infernus' top speed hp = getElementHealth©; --hpp = math.floor(hp / 1000 * 100); if (hp > 249) then hp = math.floor( ((hp-250)/750) * 100 ); else hp = 0; end kmh = math.floor(v); mph = math.floor(kmh*0.621371192); guiSetText(lblKMH,kmh .. " km/h") guiSetText(lblMPH,mph .. " mph") guiSetText(lblHP,hp .. "% HP") guiSetText(lblVehName, getVehicleName ( c)) end addEventHandler ( "onClientPlayerSpawn", getLocalPlayer(), function() guiSetVisible(lblLoc,true); end ) function flupp () guiSetVisible(gamemm,true) showCursor(true) end addEvent("onTeamadmin", true) addEventHandler("onTeamadmin", getRootElement(), visibleagain) spawn_protectionC function playerDamageTaken ( attacker, weapon, bodypart ) local sp = getElementData( getLocalPlayer(), "tdma.sp" ) if ( sp == "y" ) then cancelEvent() end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), playerDamageTaken ) helpgui.lua function riograndehelp () helpTab = call(getResourceFromName("helpmanager"), "addHelpTab", getThisResource(), true) helpGridList = guiCreateGridList ( 0.03, 0.05, 0.20, 0.9, true, helpTab ) addEventHandler ("onClientGUIClick", helpGridList, chooseHelp ) column = guiGridListAddColumn ( helpGridList, "Contents: ", 0.85 ) guiGridListSetSortingEnabled ( helpGridList, false ) local general = guiGridListAddRow ( helpGridList ) local cmds = guiGridListAddRow ( helpGridList ) local spawn = guiGridListAddRow ( helpGridList ) local rules = guiGridListAddRow ( helpGridList ) local vehicles = guiGridListAddRow ( helpGridList ) guiGridListSetItemText ( helpGridList, general, column, "General", false, false) guiGridListSetItemText ( helpGridList, cmds, column, "Commands", false, false) guiGridListSetItemText ( helpGridList, spawn, column, "Spawning", false, false) guiGridListSetItemText ( helpGridList, rules, column, "Rules", false, false) guiGridListSetItemText ( helpGridList, vehicles, column, "Vehicles", false, false) end addEventHandler ("onClientResourceStart", getResourceRootElement(getThisResource()), riograndehelp) function chooseHelp () local choosenHelp = guiGridListGetItemText ( helpGridList, guiGridListGetSelectedItem ( helpGridList ), 1 ) if choosenHelp == "General" then if not ( topic ) then topic = guiCreateLabel (0.3, 0.1, 0.5, 0.3, "General", true, helpTab) guiSetFont ( topic, "sa-gothic" ) else guiSetText (topic, "General") end if not ( mainText ) then mainText = guiCreateMemo ( 0.25, 0.3, 0.7, 0.65, "Rio Grande Gamemode is a TeamDeathmatch mode.\Kill Other Players to win Money and buy your own house.", true, helpTab) guiMemoSetReadOnly (mainText, true) else guiSetText (mainText, "Rio Grande Gamemode is a TeamDeathmatch mode.\Kill Other Players to win Money and buy your own house.") end elseif choosenHelp == "Commands" then if not ( topic ) then topic = guiCreateLabel (0.3, 0.1, 0.5, 0.3, "Commands", true, helpTab) guiSetFont ( topic, "sa-gothic" ) else guiSetText (topic, "Commands") end if not ( mainText ) then mainText = guiCreateMemo ( 0.25, 0.3, 0.7, 0.65, "If you are in a Team with an Elevator and you are near it press 'u' to use it", true, helpTab) guiMemoSetReadOnly (mainText, true) else guiSetText (mainText, "If you are in a Team with an Elevator and you are near it press 'u' to use it") end elseif choosenHelp == "Spawning" then if not ( topic ) then topic = guiCreateLabel (0.3, 0.1, 0.5, 0.3, "Spawning", true, helpTab) guiSetFont ( topic, "sa-gothic" ) else guiSetText (topic, "Spawning") end if not ( mainText ) then mainText = guiCreateMemo ( 0.25, 0.3, 0.7, 0.65, "Click on a team an u can see the Spawn. If you doubleclick it You will spawn at this position you saw!", true, helpTab) guiMemoSetReadOnly (mainText, true) else guiSetText (mainText, "Click on a team an u can see the Spawn. If you doubleclick it You will spawn at this position you saw!") end elseif choosenHelp == "Rules" then if not ( topic ) then topic = guiCreateLabel (0.3, 0.1, 0.5, 0.3, "Rules", true, helpTab) guiSetFont ( topic, "sa-gothic" ) else guiSetText (topic, "Rules") end if not ( mainText ) then mainText = guiCreateMemo ( 0.25, 0.3, 0.7, 0.65, "You are Allowed to: \nUse all the Vehicles!\nTo kill all the peoples(not your teammates)\nYou are disallowed to: \nUse Bugs! --> Kick(Ban) \nHacks, Mods --> Kick(Ban)\nSpamm --> Mute(Kick,Ban)", true, helpTab) guiMemoSetReadOnly (mainText, true) else guiSetText (mainText, "You are Allowed to: \nUse all the Vehicles!\nTo kill all the peoples(not your teammates)\nYou are disallowed to: \nUse Bugs! --> Kick(Ban) \nHacks, Mods --> Kick(Ban)\nSpamm --> Mute(Kick,Ban)") end elseif choosenHelp == "Vehicles" then if not ( topic ) then topic = guiCreateLabel (0.3, 0.1, 0.5, 0.3, "Vehicles", true, helpTab) guiSetFont ( topic, "sa-gothic" ) else guiSetText (topic, "Vehicles") end if not ( mainText ) then mainText = guiCreateMemo ( 0.25, 0.3, 0.7, 0.65, "The vehicles can be used of all the players. You are 'allowed' to stole them. \nIf you want more vehicles, talk to System or Nec", true, helpTab) guiMemoSetReadOnly (mainText, true) else guiSetText (mainText, "The vehicles can be used of all the players. You are 'allowed' to stole them. \nIf you want more vehicles, talk to System or Nec") end end end hep.xml English: Its not allowed to: ..use Cheats --> Ban ..flood the Chat --> Mute, Kick ..use Mods --> Ban ..Abuse '/report' --> Ban Spanish: ..usar trucos= ban ..spam el chat=mutear,kick ..usar mods=ban ..abusar /report=ban and my meta.xml file is this, i DONT KNOW WHERE'S THE PROBLEM! THE SPAWNWINDOW DONT WORK I DONT SEE THAT. help me please
  9. any here, can help me with this. i am trying to make that but i dont know LUA. and is not easy. Thanks. 50p know what i talked. i dont know where's the problem CHECK --Spawn UI v2 --Written by: Me --I hope this fucking works --Create the spawnWindow selection (Our only fucking window) spawnWindow = guiCreateWindow(0.7, 0.7, 0.3, 0.3, "Spawn Selection", true) spawnList = guiCreateGridList(0.05, 0.1, 0.5, 0.85, true, spawnWindow) spawnButton = guiCreateButton(0.7, 0.85, 0.2, 0.25, "Spawn", true, spawnWindow) spawnLabel = guiCreateLabel(0.6, 0.15, 0.15, 0.12, "Skin", true, spawnWindow) spawnSkin = guiCreateStaticImage(0.7, 0.25, 0.2, 0.5214, "images/box.png", true, spawnWindow) spawnInfoWindow = guiCreateWindow(0.7, 0.55, 0.3, 0.15, "Class Information", true) spawnInfoLabel = guiCreateLabel(0.05, 0.25, 0.95, 0.75, "Class Information", true, spawnInfoWindow) --Create column (and throw the fucker away, afterwards) guiGridListAddColumn(spawnList, "Class", 0.9) --Store previously selected information (to prevent repetitition) selected = { teamIndex = 0, classIndex = 0 } --Me cheating and knowing what a location looks like default = { camPos = { x = 1967.71, y = 1342.9, z = 26.63 }, camTarget = { x = 2034.47, y = 1343.02, z = 23.01 } } --The class class = {} --Make the UI visible when it needs to be function f_onResourceStart() f_setSpawnWindowVisible(true) f_getClasses() f_initGUI() f_setCameraAtLocation(default) f_fadeCameraIn(1.0) guiLabelSetHorizontalAlign(spawnInfoLabel, "left", true) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), f_onResourceStart) function f_onClientPlayerWasted(killer, weapon, bodypart) if (source == getLocalPlayer()) then f_initSpawnOnDeath() end end addEventHandler("onClientPlayerWasted", getRootElement(), f_onClientPlayerWasted) --Make the UI visible when it doesn't need to be function f_onResourceStop() f_setSpawnWindowVisible(false) guiSetVisible(spawnInfoWindow, false) f_fadeCameraIn(0) end addEventHandler("onClientResourceStop", getResourceRootElement(getThisResource()), f_onResourceStop) function f_initSpawnOnDeath() setTimer(f_fadeCameraOut, 3000, 1, 1.0) setTimer(f_setSpawnWindowVisible, 4000, 1, true) setTimer(f_setCamreaOnClick, 4000, 1) setTimer(f_fadeCameraIn, 4000, 1, 1.0) end --Populate the UI depending on what happens function f_getClasses() triggerServerEvent("s_getClasses", getLocalPlayer()) end addEvent("c_setClasses", true) function f_setClasses(teams, classes) for i, team in ipairs(teams) do local header = guiGridListAddRow(spawnList) guiGridListSetItemText(spawnList, header, 1, team, true, false) for j, class in pairs(classes) do local row = guiGridListAddRow(spawnList) guiGridListSetItemText(spawnList, row, 1, class, false, false) guiGridListSetItemData(spawnList, row, 1, tostring(i) .. " " .. tostring(j)) end end addEventHandler("onClientGUIClick", spawnList, f_getClassData) end addEventHandler("c_setClasses", getRootElement(), f_setClasses) function f_getClassData() if (source == spawnList) then triggerServerEvent("s_getClassData", getLocalPlayer(), f_getSelectedTeamIndex(), f_getSelectedClassIndex()) end end addEvent("c_setClassData", true) function f_setClassData(s_class) class = s_class f_setCameraOnClick() f_setSkinImage(f_getSelectedSkin()) guiSetVisible(spawnInfoWindow, true) guiSetText(spawnInfoLabel, s_class.info) end addEventHandler("c_setClassData", getRootElement(), f_setClassData) --Spawn Player function f_spawnPlayer(button) if (f_getSelectedTeamIndex()) and (f_getSelectedClassIndex()) and (button == "left") and (source == spawnButton) then triggerServerEvent("s_spawnPlayer", getLocalPlayer(), f_getSelectedTeamIndex(), f_getSelectedClassIndex(), f_getSelectedSkinIndex(), f_getSelectedLocationIndex(), f_getSelectedSpawnIndex()) f_setSpawnWindowVisible(false) guiSetVisible(spawnInfoWindow, false) end end --Utility Functions function f_setCameraOnClick(element) f_setCameraAtLocation(f_getSelectedLocation()) end function f_setCameraAtLocation(location) --Fade camera out f_fadeCameraOut(0) guiSetVisible(spawnButton, false) --Wait for screen to be faded before setting position setTimer ( setCameraMatrix, 50, 1, location.camPos.x, location.camPos.y, location.camPos.z, location.camTarget.x, location.camTarget.y, location.camTarget.z ) --Fade camera back in setTimer(guiSetVisible, 500, 1, spawnButton, true) setTimer(f_fadeCameraIn, 500, 1) end function f_setSkinImage(skin) guiStaticImageLoadImage(spawnSkin, "images/skins/" .. tostring(skin.id) .. ".png") end function f_fadeCameraOut(time) setTimer(fadeCamera, 100, 1, false, time) end function f_fadeCameraIn(time) setTimer(fadeCamera, 100, 1, true, time) end function f_initGUI() --Disable sorting guiGridListSetSortingEnabled(spawnList, false) --Spawn button click addEventHandler("onClientGUIClick", spawnButton, f_spawnPlayer) end function f_setSpawnWindowVisible(visible) guiSetVisible(spawnWindow, visible) showCursor(visible) if (visible) then guiBringToFront(spawnWindow) end if not visible then setCameraTarget ( getLocalPlayer ( ) ) end end --Index Functions function f_getSelectedTeamIndex() local n = guiGridListGetItemData(spawnList, guiGridListGetSelectedItem(spawnList), 1) return tonumber(gettok(n, 1, string.byte(' '))) end function f_getSelectedClassIndex() local n = guiGridListGetItemData(spawnList, guiGridListGetSelectedItem(spawnList), 1) return tonumber(gettok(n, 2, string.byte(' '))) end function f_getSelectedSkinIndex() return 1 end function f_getSelectedLocationIndex() return 1 end function f_getSelectedSpawnIndex() return 1 end --Table Functions function f_getSelectedLocation() return class.locations[1] end function f_getSelectedSkin() return class.skins[1] end
  10. Hey Nick! can change the main weapon of the TP by m4 and the katana by chainsaw? Thank You! Power by Google Translate. By. Nec[TP] and members.
×
×
  • Create New...