Jump to content

Snow-Man

Members
  • Posts

    350
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Snow-Man

  1. addEvent( "onPlayerLoadStats", true ) addEventHandler ( "onPlayerLoadStats" , root, function ( ) local name = getPlayerName(source) local occ = gerElementData(source, "Occupation") local playtime = getElementData(source, "Playtime") local serial = getPlayerSerial(source) exports.admin.getPlayerCountry(source) triggerClientEvent ("onClientPlayerLoadStats", source, name, occ, playtime, serial, country ) end ) Error: Stats-Panel/client.lua:60: attempt to concatenate local 'playtime' (a boolear)
  2. You should start resource name ID_System
  3. Please another question I want to add other things like Occupation, hours, serial Country Someone give me example of Functions to Add it in Script But Function won't work about getPlayerName
  4. label[1] = guiCreateLabel(20, 97, 224, 33, "Name : ", false, window[1]) guiSetFont(label[1], "default-bold-small") guiSetText (label[1] , getPlayerName(localPlayer)) i used like this i made Gui with BindKey then i used guiSetText (label[1] , getPlayerName(localPlayer))
  5. addEventHandler("onClientResourceStart", resourceRoot, createImage) when your start Image will display in screen addEventHandler("achievements.unlockAch", root, unlockAch) when you unlock achievement sound will play
  6. Great Job I like this resource thank you for making it
  7. label[1] = guiCreateLabel(20, 97, 224, 33, "Name : ", false, window[1]) guiSetFont(label[1], "default-bold-small")
  8. WARNING: stats/client.lua:77: bad argument @'guiSetText' [Expected gui-element at argument 1, got nil ]
  9. Hey Guys , i making Stats panel of Players but this function won't work guiSetText (label[1] , getPlayerName(localPlayer)) someone give me correct functions
  10. i can't spawn any cars GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Grid = {} car = { {520}, {425}, {519}, {447}, {476}, {511}, {522}, {468}, {432}, {428}, {470}, {579}, {541} } local teamName = "Armed Forces" local marker = createMarker( 307.29235839839844, 1804.0922851563, 17.640625, "cylinder", 1.5, 255 ,255, 255, 155) local marker2 = createMarker( 205.28984069824, 1917.2662353516, 16.640625, "cylinder", 1.5, 255 ,255, 255, 155) GUIEditor_Window[1] = guiCreateWindow(312 ,152 ,165 ,339 ,"vehicle",false) guiSetVisible(GUIEditor_Window[1],false) GUIEditor_Grid[1] = guiCreateGridList(9,19,147,274,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"vehicle name",60) GUIEditor_Button[1] = guiCreateButton(9,296,69,34,"ok",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(86,296,70,34,"close",false,GUIEditor_Window[1]) for i,v in ipairs (car) do local carName = getVehicleNameFromModel (v[1]) local row = guiGridListAddRow (GUIEditor_Grid[1]) guiGridListSetItemText (GUIEditor_Grid[1], row, 1, carName, false, true) end function onClientClick (button, state, absoluteX, absoluteYe) if (source == GUIEditor_Button[1]) then if (guiGridListGetSelectedItem (GUIEditor_Grid[1])) then local cars = guiGridListGetItemText (GUIEditor_Grid[1], guiGridListGetSelectedItem (GUIEditor_Grid[1]), 1) triggerServerEvent ("cars", getLocalPlayer(), cars) end end end addEventHandler ("onClientGUIClick", GUIEditor_Button[1], onClientClick) function onClientClick (button, state, absoluteX, absoluteYe) if (source == GUIEditor_Button[2]) then guiSetVisible(GUIEditor_Window[1],false) showCursor(false) end end addEventHandler ("onClientGUIClick", GUIEditor_Button[2], onClientClick) addEventHandler("onClientMarkerHit", marker, function ( hitPlayer, matchingDimension ) if ( isElementWithinMarker(hitPlayer, marker) ) then if ( getTeamName( getPlayerTeam( hitPlayer ) ) == teamName ) then if getElementType(hitPlayer) == "player" then guiSetVisible ( GUIEditor_Window[1], true ) showCursor(true) end else exports.DENhelp:createNewHelpMessage( "You Are Not In The Team", 0, 255, 0 ) end end end ) addEventHandler("onClientMarkerHit", marker2, function ( hitPlayer, matchingDimension ) if ( isElementWithinMarker(hitPlayer, marker2) ) then if ( getTeamName( getPlayerTeam( hitPlayer ) ) == teamName ) then if getElementType(hitPlayer) == "player" then guiSetVisible ( GUIEditor_Window[1], true ) showCursor(true) end else exports.DENhelp:createNewHelpMessage( "You Are Not In The Team", 0, 255, 0 ) end end end ) addEvent ("cars", true) addEventHandler ("cars", getRootElement(), function(cars) if isElement( veh ) then destroyElement( veh ) end local cn = getVehicleModelFromName (cars) local x,y,z = getElementPosition(source) local cn2 = getVehicleNameFromModel (cn) veh = createVehicle(cn, x,y,z) setVehicleColor(veh, 23, 75, 4) warpPedIntoVehicle(source, veh) outputChatBox ( "* "..cn2.." was created!" ) end )
  11. my friend fixed it and told me go change your meta.xml < you should use only client side >
  12. any one fix my second script marker = createMarker (205.28984069824, 1917.2662353516, 16.640625, 27 , "cylinder", 1.5, 255 ,255, 255, 155) blip = createBlipAttachedTo(marker, 27) mecTeam = createTeam ("Mechanic", 255, 153, 0) addEventHandler("onClientMarkerHit", marker, function() guiSetVisible(windowmech,true) showCursor (true) end ) windowmech = guiCreateWindow (0.3,0.2,0.4,0.4,"Mechanic",true) guiSetVisible(windowmech,false) memo = guiCreateMemo (0.1,0.1,0.8,0.7,"This job require patient,you need to find people which vehicle need repair.Access to free TowTruck.",true,windowmech) closemech = guiCreateButton (0.6,0.85,0.4,0.1,"Close",true,windowmech) buttonmech = guiCreateButton(0,0.85,0.4,0.1,"Take job",true,windowmech) function buttonClick() if (source == buttonmech) then triggerServerEvent ("mech", localPlayer) guiSetVisible(windowmech, false) showCursor (false) elseif ( source == closemech ) then guiSetVisible(windowmech, false) showCursor (false) end end addEventHandler ("onClientGUIClick", root, buttonClick)
  13. please any scripters fix my script this is server script ArmedForcesteam = createTeam ("Armed Forces",0, 160, 0) createBlip ( 95.459037780762, 1923.5686035156, 18.107088088989, 56 ) function joinArmedForces() setPlayerTeam(source,ArmedForcesteam) local x,y = guiGetScreenSize() setElementModel(source, 287) giveWeapon ( source, 3 ) setElementData( source, "Occupation", "ArmedForcesteam", true ) exports.DENhelp:createNewHelpMessage("You are now a soldier.",source,69,139,0) end addEvent("setArmedForces", true) addEventHandler("setArmedForces",root,joinArmedForces) function policeJob ( attacker, attackerweapon, bodypart, loss ) theTeam = getPlayerTeam ( attacker ) if (attackerweapon == 3) and (loss > 2 ) then setElementPosition (source, 219, 110, 999, true) setTimer ( setElementPosition, 100000, 1, source, 236.32, 110.4, 1003.2) takePlayerMoney (source, 50) givePlayerMoney (attacker, 100) end end this is Client script local marker = createMarker( 95.459037780762, 1923, 18.107088088989, "Cylinder", 1.5, 0, 69, 139, 0) GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} function guiMyCwindow(w,h,t) end windowjob = guiCreateWindow(1031,232,301,397,"Armed job",true) guiSetVisible(windowjob, false) GUIEditor_Button[1] = guiCreateButton(22,352,108,35,"Take job",false,windowjob) GUIEditor_Label[1] = guiCreateLabel(193,-103,5,5,"",false,windowjob) GUIEditor_Button[2] = guiCreateButton(179,352,110,36,"Cancel",false,windowjob) GUIEditor_Memo[1] = guiCreateMemo(19,33,273,215,"To take Armed job, press Take job.\n\nIf you don't want to, press Cancel.",false,windowjob) guiEditSetReadOnly(GUIEditor_Memo[1],true) function Armed_Forces(hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(windowjob) then guiSetVisible(windowjob, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", marker, Armed_Forces) function joinTeam() triggerServerEvent("set Armed Forces",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientMarkerHit", marker, Armed_Forces) function Soliderjobleave(leaveElement) if getElementType(leaveElement) == "player" and (leaveElement == localPlayer) then if guiGetVisible(windowjob) then guiSetVisible(windowjob, false) showCursor(false) end end end addEventHandler("onClientMarkerLeave", marker, Soliderjobleave) function joinTeam() triggerServerEvent("set Armed Forces",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeam, false) function removeArmedForcesWindow() guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[2] , removeArmedForcesWindow, false)
  14. what we can doing with dayZ ??
  15. hey Castillo i have susgest to your Script change commands on Gui why not ?
  16. this best websiter hoster https://gta-servers.net/hosting.php 48hours free
  17. nchallah yenja7 serverk ya wassim hayou lahné http://www.crgmta.netai.net
×
×
  • Create New...