Anubhav
Members-
Posts
2,277 -
Joined
-
Last visited
Everything posted by Anubhav
-
xXMADEXx can you teach me PHP? please i am very bad in it!
-
Whoops! I had forget my alot scripting part as I left MTA and i din't script anything of MTA. I will try it and tell you it works or not. EDIT: Doesn't work no debug script error and combo box is still empty as before
-
Hello guyz, I am back to MTA. I have got a problem. I am using loops to add players in combobox but they don't get added. I got no error! function addPlayero() for id,playeritem in ipairs(getElementsByType("player")) do guiComboBoxAddItem(combo, playeritem) end end
-
I can do Javscript and CSS. I used CSS in it first of all. Or that design is impossible. LOL
-
Server : function closeTuneInterface() if (isPedInVehicle(getLocalPlayer())) then local vehicle = getPedOccupiedVehicle ( getLocalPlayer()) setElementPosition(vehicle, 1910, -1758 , 14 ) setElementFrozen ( vehicle, false ) setCameraTarget(getLocalPlayer()) setCameraTarget ( getLocalPlayer() ) setHideWorldInterface(false) if (GUIEditor.window[1]) then givePlayerInput(false) destroyElement ( GUIEditor.window[1] ) GUIEditor.window[1] = nil end if (GUIEditor.window[2]) then destroyElement ( GUIEditor.window[2] ) GUIEditor.window[2] = nil end else setElementPosition(getLocalPlayer(), 1910, -1758 , 14 ) setCameraTarget(getLocalPlayer()) setCameraTarget ( getLocalPlayer() ) end end addEvent("closeTuneInterface", true) addEventHandler("closeTuneInterface", source, closeTuneInterface) Client:: function loggedOut() local logout = addEventHandler("onPlayerLogout",getRootElement(),closeTuneInterface) triggerClientEvent("closeTuneInterface", source, logout) end
-
function fadeUntilDownload() if isTransferBoxActive() == true then fadeCamera(true) end end addEventHanlder("onClientRender",getRootElement(),fadeUntilDownload)
-
I am going to make it in design you want. Now only that any.
-
Updated. Derp42/Tushal has got my first website with guarantee forever . Till 3rd customer its lifetime , after 3rd its for 30 days.
-
HHello guyz, i know i left mta and i am not going to saw i am coming back. I am a web developer now. I have learned HTML/CSS/Javascript . I making sites for free to deal email me [email protected] or skype anubhav.agarwal87 Images: http://i.imgur.com/z3w2gd4.png P.S : Please don't mind what I wrote on it . ( REQUEST ) Thanks for business. List of People , Who i gave web designs.. -Name-Date-Image Derp42/Tushal-4/25/2014-Empty Guarantee for theme , If not working. And remember - NO LIMITS FOR PAGE. I am shifted and so , I have exams this time too. And all straight one week. So i may not respond. I am new to school even and it will be hard to study cuz it is in 2 week. Please ignore if i don't answer. I need to study now , then i will create you theme. I will try in 2-3 days and send you.
-
function playersin() column = guiGridListAddColumn(player_namesgrd, "Player name", 0.9) if ( column ) then for id, playeritem in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( player_namesgrd ) guiGridListSetItemText ( player_namesgrd, row, column, getPlayerName ( playeritem ), false, false ) end end end addEventHandler ( "onClientResourceStart", getRootElement(), playersin ) setTimer(playersin,10000,0)
-
Its server.lua ... server sided
-
Use root oruse cheez3D's example. I suggest root.
-
interpolateBetween
-
function moneyToDriver(thePlayer) local model = getElementModel(thePlayer) local vehicle = getVehicleOccupants(thePlayer) if model == 438 or 420 and vehicle >1 then local timer = setTimer(givePlayerMoney,5000,0,thePlayer,5) local timer2 = setTimer(takePlayerMoney,5000,0,vehicle,5) end end function insertTaxdi( thePlayer, seat, jacked) local model = getElementModel(thePlayer) local vehicle = getVehicleOccupants(thePlayer) if model == 438 or 420 and seat == 0 and jacked or not jacked then killTimer(timer) killTimer(timer2) elseif model == 438 or 420 and seat >1 then killTimer(timer) killTimer(timer2) end end addEventHandler ( "onVehicleExit", getRootElement(), insertTaxdi)
-
1. There is .. setAccountData can work. 2. Loop it.. 3. table.insert or tableName[use one string to name it] = tostring (theValue) 4. setAccountData or maybe createElement or with tables . 5. Yes it can be. You only need to use table.insert or use tableName[use one string to name it] = tostring (theValue)
-
local marker = createMarker(...) local playerInM = 0 function onMarkerHit(hitElement) if getTeamName(getPlayerTeam(hitElement)) == "Criminal" then playerInM = playerInM+1 triggerClientEvent("markerUpdated",root,playerInM) end end addEventHandler("onMarkerHit",marker,onMarkerHit) function onMarkerLeave(leftElement) if getTeamName(getPlayerTeam(hitElement)) == "Criminal" then playerInM = playerInM-1 triggerClientEvent("markerUpdated1",root,playerInM) end end addEventHandler( "onMarkerLeave", myMarker, onMarkerLeave ) Cliented local inMarker = 0 function updated(playerInM) inMarker = inMarker+1 end addEvent("markerUpdated",true) addEventHandler("markerUpdated",root,updated) function upated1(playerInM) inMarker = inMarker-1 end addEvent("markerUpdated1",true) addEventHandler("markerUpdated1",root,updated) function render() dxDrawText("Gangster: "...tostring(inMarker), 217, 739, 477, 763, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "left", "top", true, true, true, true, false) dxDrawText("Gangster: "...tostring(inMarker), 217, 737, 477, 761, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "left", "top", true, true, true, true, false) dxDrawText("Gangster: "...tostring(inMarker), 215, 739, 475, 763, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "left", "top", true, true, true, true, false) dxDrawText("Gangster: "...tostring(inMarker), 215, 737, 475, 761, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "left", "top", true, true, true, true, false) dxDrawText("Gangster: "...tostring(inMarker), 216, 738, 476, 762, tocolor(253, 0, 0, 255), 1.00, "bankgothic", "left", "top", true, true, true, true, false) end addEventHandler("onClientRender",root,render)
-
function onGangster (hitPlayer,interior,matchingDimension) if ( hitPlayer == localPlayer ) then if getTeamName(getPlayerTeam(hitElement)) == "Police" or getTeamName(getPlayerTeam(hitElement)) == "Medic" then setElementInterior ( localPlayer, 5, 1300.1059570313, -792.5771484375, 1085.00778125 ) setElementDimension ( localPlayer, 5 ) dxDrawText("Police: ", 11, 738, 207, 763, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "left", "top", false, false, true, true, false) dxDrawText("Police: ", 11, 736, 207, 761, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "left", "top", false, false, true, true, false) dxDrawText("Police: ", 9, 738, 205, 763, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "left", "top", false, false, true, true, false) dxDrawText("Police: ", 9, 736, 205, 761, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "left", "top", false, false, true, true, false) dxDrawText("Police: ", 10, 737, 206, 762, tocolor(66, 0, 254, 255), 1.00, "bankgothic", "left", "top", false, false, true, true, false) dxDrawText("Gangster: ", 217, 739, 477, 763, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "left", "top", true, true, true, true, false) dxDrawText("Gangster: ", 217, 737, 477, 761, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "left", "top", true, true, true, true, false) dxDrawText("Gangster: ", 215, 739, 475, 763, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "left", "top", true, true, true, true, false) dxDrawText("Gangster: ", 215, 737, 475, 761, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "left", "top", true, true, true, true, false) dxDrawText("Gangster: ", 216, 738, 476, 762, tocolor(253, 0, 0, 255), 1.00, "bankgothic", "left", "top", true, true, true, true, false) dxDrawText("Medic:", 495, 738, 686, 759, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "left", "top", true, false, true, true, false) dxDrawText("Medic:", 495, 736, 686, 757, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "left", "top", true, false, true, true, false) dxDrawText("Medic:", 493, 738, 684, 759, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "left", "top", true, false, true, true, false) dxDrawText("Medic:", 493, 736, 684, 757, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "left", "top", true, false, true, true, false) dxDrawText("Medic:", 494, 737, 685, 758, tocolor(20, 232, 225, 255), 1.00, "bankgothic", "left", "top", true, false, true, true, false) end end end addEventHandler("onClientMarkerHit", gangsterMarker, onGangster ) addEventHandler("onClientRender", root, onGangster )
-
local xml = getResourceConfig("skins.xml") local models = xmlNodeGetAttribute(xml, "id") local row = guiGridListAddRow ( GUIEditor.gridlist[1] ) for k,v in ipairs(models) do guiGridListSetItemText (GUIEditor.gridlist[1], row, skins, v, false, false ) end
-
Weapon is a table or a string? if string then tostring(weapon) not sure.
-
Are you sure you entered correct X,Y,Z? Check if there are warning's/error's..
-
function playerLogin (thePreviousAccount, theCurrentAccount, autoLogin) if not (isGuestAccount (getPlayerAccount (source))) then local accountData = getAccountData (theCurrentAccount, "zmgm.money") if (accountData) then local playerMoney = getAccountData (theCurrentAccount, "zmgm.money") local playerArmor = getAccountData (theCurrentAccount, "zmgm.armor") local playerWeaponID0 = getAccountData (theCurrentAccount, "zmgm.weaponID0") local playerWeaponID1 = getAccountData (theCurrentAccount, "zmgm.weaponID1") local playerWeaponID2 = getAccountData (theCurrentAccount, "zmgm.weaponID2") local playerWeaponID3 = getAccountData (theCurrentAccount, "zmgm.weaponID3") local playerWeaponID4 = getAccountData (theCurrentAccount, "zmgm.weaponID4") local playerWeaponID5 = getAccountData (theCurrentAccount, "zmgm.weaponID5") local playerWeaponID6 = getAccountData (theCurrentAccount, "zmgm.weaponID6") local playerWeaponID7 = getAccountData (theCurrentAccount, "zmgm.weaponID7") local playerWeaponID8 = getAccountData (theCurrentAccount, "zmgm.weaponID8") local playerWeaponID9 = getAccountData (theCurrentAccount, "zmgm.weaponID9") local playerWeaponID10 = getAccountData (theCurrentAccount, "zmgm.weaponID10") local playerWeaponID11 = getAccountData (theCurrentAccount, "zmgm.weaponID11") local playerWeaponID12 = getAccountData (theCurrentAccount, "zmgm.weaponID12") local playerWeaponAmmo0 = getAccountData (theCurrentAccount, "zmgm.weaponAmmo0") local playerWeaponAmmo1 = getAccountData (theCurrentAccount, "zmgm.weaponAmmo1") local playerWeaponAmmo2 = getAccountData (theCurrentAccount, "zmgm.weaponAmmo2") local playerWeaponAmmo3 = getAccountData (theCurrentAccount, "zmgm.weaponAmmo3") local playerWeaponAmmo4 = getAccountData (theCurrentAccount, "zmgm.weaponAmmo4") local playerWeaponAmmo5 = getAccountData (theCurrentAccount, "zmgm.weaponAmmo5") local playerWeaponAmmo6 = getAccountData (theCurrentAccount, "zmgm.weaponAmmo6") local playerWeaponAmmo7 = getAccountData (theCurrentAccount, "zmgm.weaponAmmo7") local playerWeaponAmmo8 = getAccountData (theCurrentAccount, "zmgm.weaponAmmo8") local playerWeaponAmmo9 = getAccountData (theCurrentAccount, "zmgm.weaponAmmo9") local playerWeaponAmmo10 = getAccountData (theCurrentAccount, "zmgm.weaponAmmo10") local playerWeaponAmmo11 = getAccountData (theCurrentAccount, "zmgm.weaponAmmo11") local playerWeaponAmmo12 = getAccountData (theCurrentAccount, "zmgm.weaponAmmo12") local skill0 = getAccountData(theCurrentAccount, "zmgm.skill0") local skill1 = getAccountData(theCurrentAccount, "zmgm.skill1") local skill2 = getAccountData(theCurrentAccount, "zmgm.skill2") local skill3 = getAccountData(theCurrentAccount, "zmgm.skill3") local skill4 = getAccountData(theCurrentAccount, "zmgm.skill4") local skill5 = getAccountData(theCurrentAccount, "zmgm.skill5") local skill6 = getAccountData(theCurrentAccount, "zmgm.skill6") local skill7 = getAccountData(theCurrentAccount, "zmgm.skill7") local skill8 = getAccountData(theCurrentAccount, "zmgm.skill8") local skill9 = getAccountData(theCurrentAccount, "zmgm.skill9") local skill10 = getAccountData(theCurrentAccount, "zmgm.skill10") local skill11 = getAccountData(theCurrentAccount, "zmgm.skill11") setPlayerMoney (source, playerMoney) setTimer (setPedArmor, 500, 1, source, playerArmor) giveWeapon(source, playerWeaponID0, playerWeaponAmmo0, true) giveWeapon(source, playerWeaponID1, playerWeaponAmmo1, false) giveWeapon(source, playerWeaponID2, playerWeaponAmmo2, false) giveWeapon(source, playerWeaponID3, playerWeaponAmmo3, false) giveWeapon(source, playerWeaponID4, playerWeaponAmmo4, false) giveWeapon(source, playerWeaponID5, playerWeaponAmmo5, false) giveWeapon(source, playerWeaponID6, playerWeaponAmmo6, false) giveWeapon(source, playerWeaponID7, playerWeaponAmmo7, false) giveWeapon(source, playerWeaponID8, playerWeaponAmmo8, false) giveWeapon(source, playerWeaponID9, playerWeaponAmmo9, false) giveWeapon(source, playerWeaponID10, playerWeaponAmmo10, false) giveWeapon(source, playerWeaponID11, playerWeaponAmmo11, false) giveWeapon(source, playerWeaponID12, playerWeaponAmmo12, false) setPedStat ( source, 69, skill0 ) setPedStat ( source, 70, skill1 ) setPedStat ( source, 71, skill2 ) setPedStat ( source, 72, skill3 ) setPedStat ( source, 73, skill4 ) setPedStat ( source, 74, skill5 ) setPedStat ( source, 75, skill6 ) setPedStat ( source, 76, skill7 ) setPedStat ( source, 77, skill8 ) setPedStat ( source, 78, skill9 ) setPedStat ( source, 79, skill10 ) setPedStat ( source, 24, skill11 ) end end end addEventHandler ("onPlayerLogin", getRootElement(), playerLogin) function onQuit (quitType, reason, responsibleElement) if not (isGuestAccount (getPlayerAccount (source))) then local account = getPlayerAccount (source) if (account) then setAccountData (account, "zmgm.money", tostring (getPlayerMoney (source))) setAccountData (account, "zmgm.armor", tostring (getPedArmor (source))) setAccountData (account, "zmgm.weaponID0", getPedWeapon (source, 0)) setAccountData (account, "zmgm.weaponID1", getPedWeapon (source, 1)) setAccountData (account, "zmgm.weaponID2", getPedWeapon (source, 2)) setAccountData (account, "zmgm.weaponID3", getPedWeapon (source, 3)) setAccountData (account, "zmgm.weaponID4", getPedWeapon (source, 4)) setAccountData (account, "zmgm.weaponID5", getPedWeapon (source, 5)) setAccountData (account, "zmgm.weaponID6", getPedWeapon (source, 6)) setAccountData (account, "zmgm.weaponID7", getPedWeapon (source, 7)) setAccountData (account, "zmgm.weaponID8", getPedWeapon (source, -- s8) -->) setAccountData (account, "zmgm.weaponID9", getPedWeapon (source, 9)) setAccountData (account, "zmgm.weaponID10", getPedWeapon (source, 10)) setAccountData (account, "zmgm.weaponID11", getPedWeapon (source, 11)) setAccountData (account, "zmgm.weaponID12", getPedWeapon (source, 12)) setAccountData (account, "zmgm.weaponAmmo0", getPedTotalAmmo (source, 0)) setAccountData (account, "zmgm.weaponAmmo1", getPedTotalAmmo (source, 1)) setAccountData (account, "zmgm.weaponAmmo2", getPedTotalAmmo (source, 2)) setAccountData (account, "zmgm.weaponAmmo3", getPedTotalAmmo (source, 3)) setAccountData (account, "zmgm.weaponAmmo4", getPedTotalAmmo (source, 4)) setAccountData (account, "zmgm.weaponAmmo5", getPedTotalAmmo (source, 5)) setAccountData (account, "zmgm.weaponAmmo6", getPedTotalAmmo (source, 6)) setAccountData (account, "zmgm.weaponAmmo7", getPedTotalAmmo (source, 7)) setAccountData (account, "zmgm.weaponAmmo8", getPedTotalAmmo (source, -- s8) -->) setAccountData (account, "zmgm.weaponAmmo9", getPedTotalAmmo (source, 9)) setAccountData (account, "zmgm.weaponAmmo10", getPedTotalAmmo (source, 10)) setAccountData (account, "zmgm.weaponAmmo11", getPedTotalAmmo (source, 11)) setAccountData (account, "zmgm.weaponAmmo12", getPedTotalAmmo (source, 12)) setAccountData (account, "zmgm.skill0", getPedStat ( source, 69 )) setAccountData (account, "zmgm.skill1", getPedStat ( source, 70 )) setAccountData (account, "zmgm.skill2", getPedStat ( source, 71 )) setAccountData (account, "zmgm.skill3", getPedStat ( source, 72 )) setAccountData (account, "zmgm.skill4", getPedStat ( source, 73 )) setAccountData (account, "zmgm.skill5", getPedStat ( source, 74 )) setAccountData (account, "zmgm.skill6", getPedStat ( source, 75 )) setAccountData (account, "zmgm.skill7", getPedStat ( source, 76 )) setAccountData (account, "zmgm.skill8", getPedStat ( source, 77 )) setAccountData (account, "zmgm.skill9", getPedStat ( source, 78 )) setAccountData (account, "zmgm.skill10", getPedStat ( source, 79 )) setAccountData (account, "zmgm.skill11", getPedStat ( source, 25 )) end end end addEventHandler ("onPlayerQuit", getRootElement(), onQuit) local tempData = { } addEventHandler ( "onPlayerWasted", getRootElement(), function ( ) tempData [ source ] = { weapons = getWeaponsTable ( source ), skin = getElementModel ( source ) } end ) addEventHandler ( "onPlayerSpawn", getRootElement(), function ( ) if ( tempData [ source ] ) then for weapon, ammo in pairs ( tempData [ source ] ) do giveWeapon ( source, weapon, ammo, true ) end end end ) function getWeaponsTable ( thePlayer ) local weapons = { } local hasAnyWeapon = false for slot = 0, 12 do local weapon = getPedWeapon ( thePlayer, slot ) if ( weapon > 0 ) then local ammo = getPedTotalAmmo ( thePlayer, slot ) if ( ammo > 0 ) then weapons [ weapon ] = ammo hasAnyWeapon = true end end end if ( hasAnyWeapon ) then return weapons end end Maybe this would work..
-
Hello players. Is it possible to save what ped did and play it again? Is it very hard to do? Thanks...
-
Lol? See at the wiki setElementHealth example. Why there is -20 not -200?
-
function playerHP(attacker) local hp = getElementHealth (source) if hp < 30 then cancelEvent() end end addEventHandler("onClientPlayerDamage",getRootElement(),playerHP)