Chris!i!
Members-
Posts
213 -
Joined
-
Last visited
Everything posted by Chris!i!
-
You need to to disable the silencer weapon ? only?
-
local weapon = createWeapon("m4", -2376.80, -578.50, 132.3) setWeaponClipAmmo(weapon, 200) setWeaponState(weapon, "ready") function bindFire (source) local x, y, z = getElementPosition ( source ) attachElements ( weapon, source, x, y, z ) end addEvent( "bindFire", true ) addEventHandler( "bindFire", localPlayer, bindFire )
-
local weapon = createWeapon("m4", -2376.80, -578.50, 132.3) setWeaponClipAmmo(weapon, 200) setWeaponState(weapon, "ready") function bindFire (source) local x, y, z = getElementPosition ( source ) attachElements ( weapon, source, 0, 0, 5 ) end addEvent( "bindFire", true ) addEventHandler( "bindFire", localPlayer, bindFire )
-
You can't use getPlayerGroup, does your group system have an export called getPlayerGroup ?
-
Use getAccountName then if accountname = "accountNameHere" setWeaponProperty etc... onResourceStart Thats the codes u need
-
Still doesnt work.
-
Okay thanks for letting me understand this so the key can be anything, okay i got it, i will test it after some minutes and tell you the result thank you everyone
-
function onPlayerQuit() local playeraccount = getPlayerAccount(source) if (playerAccount) then local walk = getPedWalkingStyle(source) setAccountData(playeraccount, "walkingstyle", walk) end end addEventHandler("onPlayerQuit", getRootElement(), onPlayerQuit) -- add an event handler ---------------------------------------------------- ---------------------------------------------------- function onPlayerLogin() local playerAccount = getPlayerAccount(source) -- get his account if (playerAccount) then local walk = getAccountData(playerAccount, "walkingstyle") if (walk) then setPedWalkingStyle(source, walk) end end end addEventHandler("onPlayerLogin", getRootElement(), onPlayerLogin) Ok what should i do know since i didnt understand anything.
-
setAccountData(playerAccount, "piraterpg.money", playerMoney) I have read wiki of setAccountData but whats this piraterpg.money i didnt understand it. if u need the code i made i can post it
-
Wow.. thanks man it worked, it was easy
-
do u need infernus doesnt get damage?
-
local player = getLocalPlayer () font = guiCreateFont( "font.TTF", 14 ) marker1 = createMarker ( 759.08984375, -59.798828125, 999.7802124023, "cylinder", 1.5, 100, 0, 0, 255 ) marker2 = createMarker ( 773.375, 5.2412109375, 999.7802124023, "cylinder", 1.5, 100, 0, 0, 255 ) marker3 = createMarker ( 756.443359375, -48.0576171875, 999.7802124023, "cylinder", 1.5, 100, 0, 0, 255 ) blip1 = createBlip( 1968.8681640625, 2295.1806640625, 54, 54 ) blip2 = createBlip( -2270.4599609375, -155.95703125, 24, 54 ) blip3 = createBlip( 2229.6298828125, -1721.6298828125, 44, 54 ) setElementInterior(marker1, 7) setElementInterior(marker2, 5) setElementInterior(marker3, 6) GUIEditor = { gridlist = {}, window = {}, button = {}, memo = {} --scrollbar = {} } local screenW, screenH = guiGetScreenSize() GUIEditor.window[1] = guiCreateWindow((screenW - 678) / 2, (screenH - 695) / 2, 678, 695, "Set Your Walking Style", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.gridlist[1] = guiCreateGridList(9, 23, 659, 355, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "Walking Styles", 0.9) local armed = guiGridListAddRow(GUIEditor.gridlist[1], "Armed") local blind = guiGridListAddRow(GUIEditor.gridlist[1], "Blind Man") local busy = guiGridListAddRow(GUIEditor.gridlist[1], "Busy Women") local default = guiGridListAddRow(GUIEditor.gridlist[1], "Default") local drunk = guiGridListAddRow(GUIEditor.gridlist[1], "Drunk Man") local fat = guiGridListAddRow(GUIEditor.gridlist[1], "Fat Man") local fatw = guiGridListAddRow(GUIEditor.gridlist[1], "Fat Woman") local g1 = guiGridListAddRow(GUIEditor.gridlist[1], "Gang 1") local g2 = guiGridListAddRow(GUIEditor.gridlist[1], "Gang 2") local jp = guiGridListAddRow(GUIEditor.gridlist[1], "Jetpack") local other = guiGridListAddRow(GUIEditor.gridlist[1], "Sneak") local jogg = guiGridListAddRow(GUIEditor.gridlist[1], "Jogger") local men = guiGridListAddRow(GUIEditor.gridlist[1], "Men") local ofm = guiGridListAddRow(GUIEditor.gridlist[1], "Old FatMan") local ofw = guiGridListAddRow(GUIEditor.gridlist[1], "Old FatWomen") local pyr = guiGridListAddRow(GUIEditor.gridlist[1], "Player") local pyr2 = guiGridListAddRow(GUIEditor.gridlist[1], "Player 2") local pro = guiGridListAddRow(GUIEditor.gridlist[1], "Pro") local swt = guiGridListAddRow(GUIEditor.gridlist[1], "SWAT") local swmn = guiGridListAddRow(GUIEditor.gridlist[1], "Sexy Women") local shp = guiGridListAddRow(GUIEditor.gridlist[1], "Shopping") local shf = guiGridListAddRow(GUIEditor.gridlist[1], "Shuffle") local wmn = guiGridListAddRow(GUIEditor.gridlist[1], "Woman") --[[guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "Armed", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "Blind Man", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 2, 1, "Busy Woman", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 3, 1, "Default", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 4, 1, "Drunk Man", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 5, 1, "Fat Man", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 6, 1, "Fat Woman", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 7, 1, "Gang 1", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 8, 1, "Gang 2", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 9, 1, "Jetpack", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 10, 1, "Jogger", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 11, 1, "Men", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 12, 1, "Old FatMan", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 13, 1, "Old FatWoman", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 14, 1, "Player", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 15, 1, "Player 2", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 16, 1, "Pro", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 17, 1, "SWAT", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 18, 1, "Sexy Woman", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 19, 1, "Shopping", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 20, 1, "Shuffle", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 21, 1, "Sneak", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 22, 1, "Woman", false, false) ]] guiSetAlpha(GUIEditor.gridlist[1], 0.75) GUIEditor.memo[1] = guiCreateMemo(0, 389, 659, 200, "Walking style, choose one from the list and click accept, here you go you got it!\nThere's About 23 Walking Styles, choose one and ROCK!\nEnjoy!\nMade by Chris!i!", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(9, 599, 331, 86, "ACCEPT", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], font) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.button[2] = guiCreateButton(342, 599, 326, 86, "CLOSE", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], font) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") guiMemoSetReadOnly ( GUIEditor.memo[1], true ) guiSetFont(GUIEditor.gridlist[1], font) function setGUIVisible(hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(GUIEditor.window[1]) then guiSetVisible(GUIEditor.window[1], true) showCursor(true) end end end addEventHandler ( "onClientMarkerHit", marker1, setGUIVisible ) addEventHandler ( "onClientMarkerHit", marker2, setGUIVisible ) addEventHandler ( "onClientMarkerHit", marker3, setGUIVisible ) function closeGUI () if source == GUIEditor.button[2] then guiSetVisible ( GUIEditor.window[1], false ) showCursor ( false ) end end addEventHandler ( "onClientGUIClick", GUIEditor.button[2], closeGUI ) function dontAppearOnStart () guiSetVisible ( GUIEditor.window[1], false ) showCursor (false) end addEventHandler ( "onClientResourceStart", getRootElement(), dontAppearOnStart ) function select () local id = guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) if id == armed then setPedWalkingStyle ( player, 60 ) elseif id == blind then setPedWalkingStyle ( player, 127 ) elseif id == busy then setPedWalkingStyle ( player, 69 ) elseif id == default then setPedWalkingStyle ( player, 0 ) elseif id == drunk then setPedWalkingStyle ( player, 126 ) elseif id == fat then setPedWalkingStyle ( player, 124 ) elseif id == fatw then setPedWalkingStyle ( player, 135 ) elseif id == g1 then setPedWalkingStyle ( player, 121 ) elseif id == g2 then setPedWalkingStyle ( player, 122 ) elseif id == jp then setPedWalkingStyle ( player, 70 ) elseif id == other then setPedWalkingStyle ( player, 69 ) elseif id == jogg then setPedWalkingStyle ( player, 125 ) elseif id == men then setPedWalkingStyle ( player, 118 ) elseif id == ofm then setPedWalkingStyle ( player, 123 ) elseif id == ofw then setPedWalkingStyle ( player, 137 ) elseif id == pyr then setPedWalkingStyle ( player, 54 ) end end addEventHandler ( "onClientGUIClick", GUIEditor.button[1], select, false ) Again, whats wrong when i putted 1 Row in the gridlist it worked, but when i putted all of them in the gridlist it doesnt even give 1 error, and i cant see anytihng the gridlist! please help
-
function changeBodyStrength(thePlayer) setPedStat(thePlayer, 24, 1000) addEventHandler ( "onResourceStart", getRootElement(), changeBodyStrength )
-
u cant use getElementModel for a vehicle use getPedOccupiedVehicle Sorry my code didnt work.
-
Now it works by adding if source == guielement-button then thanks Mega9 so much.
-
But now Close button doesnt work
-
font = guiCreateFont( "font.TTF", 14 ) marker1 = createMarker ( 759.08984375, -59.798828125, 999.7802124023, "cylinder", 1.5, 100, 0, 0, 255 ) marker2 = createMarker ( 773.375, 5.2412109375, 999.7802124023, "cylinder", 1.5, 100, 0, 0, 255 ) marker3 = createMarker ( 756.443359375, -48.0576171875, 999.7802124023, "cylinder", 1.5, 100, 0, 0, 255 ) blip1 = createBlip( 1968.8681640625, 2295.1806640625, 54, 54 ) blip2 = createBlip( -2270.4599609375, -155.95703125, 24, 54 ) blip3 = createBlip( 2229.6298828125, -1721.6298828125, 44, 54 ) setElementInterior(marker1, 7) setElementInterior(marker2, 5) setElementInterior(marker3, 6) GUIEditor = { gridlist = {}, window = {}, button = {}, memo = {}, scrollbar = {} } local screenW, screenH = guiGetScreenSize() GUIEditor.window[1] = guiCreateWindow((screenW - 678) / 2, (screenH - 695) / 2, 678, 695, "Set Your Walking Style", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.gridlist[1] = guiCreateGridList(9, 23, 659, 355, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "Walking Styles", 0.9) for i = 1, 23 do guiGridListAddRow(GUIEditor.gridlist[1]) end guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "Armed", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "Blind Man", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 2, 1, "Busy Woman", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 3, 1, "Default", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 4, 1, "Drunk Man", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 5, 1, "Fat Man", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 6, 1, "Fat Woman", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 7, 1, "Gang 1", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 8, 1, "Gang 2", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 9, 1, "Jetpack", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 10, 1, "Jogger", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 11, 1, "Men", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 12, 1, "Old FatMan", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 13, 1, "Old FatWoman", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 14, 1, "Player", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 15, 1, "Player 2", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 16, 1, "Pro", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 17, 1, "SWAT", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 18, 1, "Sexy Woman", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 19, 1, "Shopping", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 20, 1, "Shuffle", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 21, 1, "Sneak", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 22, 1, "Woman", false, false) GUIEditor.memo[1] = guiCreateMemo(0, 389, 659, 200, "Walking style, choose one from the list and click accept, here you go you got it!\nThere's About 23 Walking Styles, choose one and ROCK!\nEnjoy!\nMade by Chris!i!", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(9, 599, 331, 86, "ACCEPT", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], font) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.button[2] = guiCreateButton(342, 599, 326, 86, "CLOSE", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], font) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") guiMemoSetReadOnly ( GUIEditor.memo[1], true ) guiSetFont(GUIEditor.gridlist[1], font) function setGUIVisible () guiSetVisible (GUIEditor.window[1], not guiGetVisible ( GUIEditor.window[1] ) ) showCursor ( true ) end addEventHandler ( "onClientMarkerHit", marker1, setGUIVisible ) addEventHandler ( "onClientMarkerHit", marker2, setGUIVisible ) addEventHandler ( "onClientMarkerHit", marker3, setGUIVisible ) function closeGUI () guiSetVisible ( GUIEditor.window[1], false ) showCursor ( false ) end addEventHandler ( "onGUIClick", GUIEditor.button[2], closeGUI ) function dontAppearOnStart () guiSetVisible ( GUIEditor.window[1], false ) showCursor (false) end addEventHandler ( "onClientResourceStart", getRootElement(), dontAppearOnStart ) Wait is that good ? It got fixed at onClientGUIClick i set it to onGUIClick so thats right yea ? it worked for me but it does something wrong or all good ?
-
Why when i press on the top of the panel where it says its name it close or when i press on the panel if there are no things like gridlists button ... it closes why?? its really annoying me first time i experience this problem please help what function should i use?
-
function onLogin (_,account) setElementData(source, "player.level", getAccountData(account, "level") or 1) setElementData(source, "player.experience", getAccountData(account, "experience") or 0) end addEventHandler ("onPlayerLogin", root, onLogin) function onLogout (_,account) saveData(account, "experience") saveData(account, "level") or 1) setElementData(source, "player.level", 1) setElementData(source, "player.experience", 0) setElementData(source,"Rankicon","private") end addEventHandler ("onPlayerLogout", root, onLogout) function saveData(thePlayer, theAccount) local theAccount = getPlayerAccount(source) if (theAccount and not isGuestAccount(theAccount)) then setAccountData (theAccount, "level", getElementData(thePlayer, "player.level")) setAccountData (theAccount, "experience", getElementData(thePlayer, "player.experience")) end end addEventHandler ("onPlayerQuit", root, function () saveData(source, getPlayerAccount(source)) end) addEventHandler ("onPlayerLogout", root, function () saveData(source, getPlayerAccount(source)) end) This maybe should work
-
this should work ped1 = createPed(56, -2225.376953125, 2333.6584472656, 7.546875) pedanim = setTimer ( setPedAnimation, 5000, 0, ped1, "ped", "SEAT_idle" ) function peddestroy ( thePlayer ) if ( isPedDead (ped1) ) then outputChatBox ( "Ped is dead", thePlayer ) killTimer( pedanim ) --stop ped anim timer when destroying the ped destroyElement( ped1 ) --removed timer here, to prevent your code conflicting with the ped's respawn end end addEventHandler("onPedWasted", getRootElement(), peddestroy ) function pedrespawnafterdeath () ped1 = createPed(56, -2225.376953125, 2333.6584472656, 7.546875) pedanim = setTimer ( setPedAnimation, 5000, 0, ped1, "ped", "SEAT_idle" ) end addEventHandler ( "onPedWasted", ped1, pedrespawnafterdeath ) The rest that you did is totally useless, this will make your ped respawn after death
