Jump to content

TheIceman1

Members
  • Posts

    296
  • Joined

  • Last visited

Everything posted by TheIceman1

  1. Nothing happens. brped = createPed ( 150,359.7, 173.85, 1008.39 ) setElementInterior ( brped, 3 ) setElementRotation ( brped, 0, 0, 270 ) function startbr () local team = getPlayerTeam(source) if team and team == getTeamFromName("Criminal") then setPlayerWantedLevel ( source, 6 ) setElementData ( source, "brstart", "true" ) end end addEventHandler ( "onPedWasted", brped, startbr )
  2. Why i cant kill this ped? brped = createPed ( 150,359.7, 173.85, 1008.39 ) setElementInterior ( brped, 3 ) setElementRotation ( brped, 0, 0, 270 ) setPedFrozen ( brped, true )
  3. CapY nepalačam,trebam mappera i forum managera. CaptainZ,a ko je reko da nisam?
  4. Trebam developera za RPG server!!Zainterisirani u PM!!
  5. TheIceman1

    Help pls

    Why this dont give me new car when i hit marker(carmarker)?No errors function createCarrou () if ( getElementData ( source, "Role" ) == "Car Jacker" ) then x, y, z = unpackCarjacker() ID = model() vehicle = createVehicle ( ID ,x, y, z ) carBlip = createBlipAttachedTo ( vehicle, 41 ) addEventHandler ( "onVehicleEnter", vehicle, carHit ) end end addEvent ( "createCarrou", true ) addEventHandler ( "createCarrou", getRootElement(), createCarrou ) function carHit ( hitPlayer ) hitPlayer = localPlayer carmarker = createMarker( 2041.9,-1777.7,13, "cylinder", 3, 250, 0, 0 ) markerblip = createBlipAttachedTo(carmarker,51) addEventHandler ("onMarkerHit", carmarker, createnewcar ) end function createnewcar ( thePlayer ) if (isPedInVehicle(thePlayer)) then triggerEvent ( "carmoney", thePlayer ) destroyElement ( vehicle ) destroyElement ( carBlip ) destroyElement ( carmarker ) destroyElement ( markerblip ) setTimer( createCarrou() , 2000, 1 ) end end
  6. TheIceman1

    Skin shop

    Why this dont set skins on gridlist?No errors local skins = { {"CJ",0,1000}, {"Idk",1,1000} } function setskinsongrid () for key, value in ipairs(skins) do local row = guiGridListAddRow(GUIEditor_Grid[1]) guiGridListSetItemText(GUIEditor_Grid[1], row, GUIEditor_Column[2], id[2], false, false) guiGridListSetItemText(GUIEditor_Grid[1], row, GUIEditor_Column[1], name[1], false, false) guiGridListSetItemText(GUIEditor_Grid[1], row, GUIEditor_Column[3], money[3], false, false) end end addEventHandler ( "onClientResourceStart", getThisResource(), setskinsongrid )
  7. TheIceman1

    God mode

    Why this dont save me of damage? function godmode() if (getPlayerTeam( localplayer ) == getTeamFromName("Staff") ) then cancelEvent() end end addEventHandler ( "onClientPlayerDamage", root, godmode )
  8. how to do that, 2 check box cant be selected at same time?Well,when I click on the first checkbox then first checkbox is selected,but when I click on second checkbox then first checkbox is unselected and second checkbox is selected.Understand?
  9. Noo,you dont understand,you must read script!
  10. Then the problem is in Ninguems save system.
  11. Why this dont set my fightin style to "Boxing"?No errors. Client function box () if ( guiCheckBoxGetSelected(GUIEditor_Checkbox[1]) ) then triggerServerEvent ( getLocalPlayer(), "box" ) end end addEventHandler ( "onClientGUIClick", GUIEditor_Button[1], box ) Server function box () if ( getPlayerMoney(source) >= 1000 ) then setPedFightingStyle ( source, 5 ) takePlayerMoney ( source, 1000 ) else exports ["guimessages"] : outputServer ( source, "You don't have enought money!" , 255, 255, 0 ) end end addEvent ( "box", true ) addEventHandler ( "box", root, box )
  12. But when i die then Ninguems save system dont save my weapons,only when i quit/login,then i made script when i die then it save my weapons.How to fix it?
  13. I have this script addEventHandler ( "onPlayerWasted", root, function ( ) local account = getPlayerAccount ( source ) if ( account and not isGuestAccount ( account ) ) then local wlw = getPlayerWantedLevel ( source ) setAccountData ( account, "saveWL", wlw ) for slot = 1, 12 do setAccountData ( account, "save-wep".. slot, getPedWeapon ( source, slot ) ) setAccountData ( account, "save-ammo".. slot, getPedTotalAmmo ( source, slot ) ) end end end ) addEventHandler ( "onPlayerSpawn", root, function ( ) local account = getPlayerAccount ( source ) if ( account and not isGuestAccount ( account ) ) then local wl = getAccountData ( account, "saveWL" ) setPlayerWantedLevel ( source, wl ) for slot = 1, 12 do local wep = getAccountData ( account, "save-wep".. slot ) local ammo = getAccountData ( account, "save-ammo".. slot ) giveWeapon ( source, wep, ammo ) end end end )
  14. Why this give double ammo when I quit server? ffunction playerLogin (thePreviousAccount, theCurrentAccount, autoLogin) if not (isGuestAccount (getPlayerAccount (source))) then local accountData = getAccountData (theCurrentAccount, "funmodev2-money") if (accountData) then local playerMoney = getAccountData (theCurrentAccount, "funmodev2-money") local playerSkin = getAccountData (theCurrentAccount, "funmodev2-skin") local playerHealth = getAccountData (theCurrentAccount, "funmodev2-health") local playerArmor = getAccountData (theCurrentAccount, "funmodev2-armor") local playerX = getAccountData (theCurrentAccount, "funmodev2-x") local playerY = getAccountData (theCurrentAccount, "funmodev2-y") local playerZ = getAccountData (theCurrentAccount, "funmodev2-z") local playerInt = getAccountData (theCurrentAccount, "funmodev2-int") local playerDim = getAccountData (theCurrentAccount, "funmodev2-dim") local playerWanted = getAccountData (theCurrentAccount, "funmodev2-wantedlevel") local playerTeam = getAccountData (theCurrentAccount, "funmodev2-Team") local playerWeaponID0 = getAccountData (theCurrentAccount, "funmodev2-weaponID0") local playerWeaponID1 = getAccountData (theCurrentAccount, "funmodev2-weaponID1") local playerWeaponID2 = getAccountData (theCurrentAccount, "funmodev2-weaponID2") local playerWeaponID3 = getAccountData (theCurrentAccount, "funmodev2-weaponID3") local playerWeaponID4 = getAccountData (theCurrentAccount, "funmodev2-weaponID4") local playerWeaponID5 = getAccountData (theCurrentAccount, "funmodev2-weaponID5") local playerWeaponID6 = getAccountData (theCurrentAccount, "funmodev2-weaponID6") local playerWeaponID7 = getAccountData (theCurrentAccount, "funmodev2-weaponID7") local playerWeaponID8 = getAccountData (theCurrentAccount, "funmodev2-weaponID8") local playerWeaponID9 = getAccountData (theCurrentAccount, "funmodev2-weaponID9") local playerWeaponID10 = getAccountData (theCurrentAccount, "funmodev2-weaponID10") local playerWeaponID11 = getAccountData (theCurrentAccount, "funmodev2-weaponID11") local playerWeaponID12 = getAccountData (theCurrentAccount, "funmodev2-weaponID12") local playerWeaponAmmo0 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo0") local playerWeaponAmmo1 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo1") local playerWeaponAmmo2 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo2") local playerWeaponAmmo3 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo3") local playerWeaponAmmo4 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo4") local playerWeaponAmmo5 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo5") local playerWeaponAmmo6 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo6") local playerWeaponAmmo7 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo7") local playerWeaponAmmo8 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo8") local playerWeaponAmmo9 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo9") local playerWeaponAmmo10 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo10") local playerWeaponAmmo11 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo11") local playerWeaponAmmo12 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo12") local role = getAccountData (theCurrentAccount, "funmodev2-role") spawnPlayer (source, playerX, playerY, playerZ +1, 0, playerSkin, playerInt, playerDim) setPlayerMoney (source, playerMoney) setElementData(source, "Role", role) setTimer (setElementHealth, 500, 1, source, playerHealth) setTimer (setPedArmor, 500, 1, source, playerArmor) setTimer (setPlayerWantedLevel, 500, 1, source, playerWanted) 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) setCameraTarget (source, source) fadeCamera(source, true, 2.0) else spawnPlayer (source, 1481.0855712891, -1771.2996826172, 18.795753479004, 0,78, 0, 0) setPlayerMoney (source, 200) setElementData(source, "Role", role) setCameraTarget (source, source) fadeCamera(source, true, 2.0) end end end addEventHandler ("onPlayerLogin", getRootElement(), playerLogin) function onLogout () kickPlayer (source, nil, "Logging out is disallowed.") end addEventHandler ("onPlayerLogout", getRootElement(), onLogout) function onQuit (quitType, reason, responsibleElement) if not (isGuestAccount (getPlayerAccount (source))) then account = getPlayerAccount (source) if (account) then local x,y,z = getElementPosition (source) setAccountData (account, "funmodev2-money", tostring (getPlayerMoney (source))) setAccountData (account, "funmodev2-skin", tostring (getPedSkin (source))) setAccountData (account, "funmodev2-health", tostring (getElementHealth (source))) setAccountData (account, "funmodev2-armor", tostring (getPedArmor (source))) setAccountData (account, "funmodev2-R", r) setAccountData (account, "funmodev2-G", g) setAccountData (account, "funmodev2-B", b) setAccountData (account, "funmodev2-x", x) setAccountData (account, "funmodev2-y", y) setAccountData (account, "funmodev2-z", z) setAccountData (account, "funmodev2-int", getElementInterior (source)) setAccountData (account, "funmodev2-dim", getElementDimension (source)) setAccountData (account, "funmodev2-wantedlevel", getPlayerWantedLevel (source)) setAccountData (account, "funmodev2-weaponID0", getPedWeapon (source, 0)) setAccountData (account, "funmodev2-weaponID1", getPedWeapon (source, 1)) setAccountData (account, "funmodev2-weaponID2", getPedWeapon (source, 2)) setAccountData (account, "funmodev2-weaponID3", getPedWeapon (source, 3)) setAccountData (account, "funmodev2-weaponID4", getPedWeapon (source, 4)) setAccountData (account, "funmodev2-weaponID5", getPedWeapon (source, 5)) setAccountData (account, "funmodev2-weaponID6", getPedWeapon (source, 6)) setAccountData (account, "funmodev2-weaponID7", getPedWeapon (source, 7)) setAccountData (account, "funmodev2-weaponID8", getPedWeapon (source, -- s8) -->) setAccountData (account, "funmodev2-weaponID9", getPedWeapon (source, 9)) setAccountData (account, "funmodev2-weaponID10", getPedWeapon (source, 10)) setAccountData (account, "funmodev2-weaponID11", getPedWeapon (source, 11)) setAccountData (account, "funmodev2-weaponID12", getPedWeapon (source, 12)) setAccountData (account, "funmodev2-weaponAmmo0", getPedTotalAmmo (source, 0)) setAccountData (account, "funmodev2-weaponAmmo1", getPedTotalAmmo (source, 1)) setAccountData (account, "funmodev2-weaponAmmo2", getPedTotalAmmo (source, 2)) setAccountData (account, "funmodev2-weaponAmmo3", getPedTotalAmmo (source, 3)) setAccountData (account, "funmodev2-weaponAmmo4", getPedTotalAmmo (source, 4)) setAccountData (account, "funmodev2-weaponAmmo5", getPedTotalAmmo (source, 5)) setAccountData (account, "funmodev2-weaponAmmo6", getPedTotalAmmo (source, 6)) setAccountData (account, "funmodev2-weaponAmmo7", getPedTotalAmmo (source, 7)) setAccountData (account, "funmodev2-weaponAmmo8", getPedTotalAmmo (source, -- s8) -->) setAccountData (account, "funmodev2-weaponAmmo9", getPedTotalAmmo (source, 9)) setAccountData (account, "funmodev2-weaponAmmo10", getPedTotalAmmo (source, 10)) setAccountData (account, "funmodev2-weaponAmmo11", getPedTotalAmmo (source, 11)) setAccountData (account, "funmodev2-weaponAmmo12", getPedTotalAmmo (source, 12)) setAccountData (account, "funmodev2-role", getElementData ( source, "Role" )) end end end addEventHandler ("onPlayerQuit", getRootElement(), onQuit)
  15. @ IYAMA:thanks @Mr.Prestage: you dont know what i want
  16. TheIceman1

    Weapons

    Why this dont give me "Sawned-off"? local weaponsTable = { {"Colt 45",100,500}, {"Silenced",100,500}, {"Deagle",75,500},{"Shotgun",10,200}, {"Sawned-Off",10,200}, {"Combat Shotgun",10,300}, {"Uzi",100,500}, {"TEC-9",100,500}, {"MP5",100,700}, {"AK-47",100,600}, {"M4",100,600}, {"Rifle",10,1000}, {"Sniper",10,1000}, {"Rocket Launcher",1,10000}, {"Grenade",10,600}, {"Parachute",1,800}, {"Chainsaw",1,50000} }
  17. Hello,i have problem with admin panel,All players can open the admin panel,but they dont have this permission.How to fix it? "Everyone"> "user.*"> "resource.*">
  18. Working,but when I click on "Sniper" then just "Sniper" is marked. GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Grid = {} GUIEditor_Column = {} GUIEditor_Window[1] = guiCreateWindow(311,117,490,467,"SACR Weapon shop",false) guiSetVisible(GUIEditor_Window[1], false) GUIEditor_Grid[1] = guiCreateGridList(10,29,469,393,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) GUIEditor_Column[1] = guiGridListAddColumn(GUIEditor_Grid[1],"Weapon name:",0.6) GUIEditor_Column[2] = guiGridListAddColumn(GUIEditor_Grid[1],"Slot:",0.2) GUIEditor_Column[3] = guiGridListAddColumn(GUIEditor_Grid[1],"Price:",0.2) GUIEditor_Button[1] = guiCreateButton(9,430,228,27,"Buy",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(248,430,228,27,"Close",false,GUIEditor_Window[1]) GUIEditor_Window[2] = guiCreateWindow(350,223,376,205,"SACR Weapon licence",false) guiSetVisible(GUIEditor_Window[2], false) GUIEditor_Label[1] = guiCreateLabel(9,22,352,129,"If you want buy weapons,you must have licence!Licence price:$25.000.",false,GUIEditor_Window[2]) GUIEditor_Button[3] = guiCreateButton(16,165,152,29,"Buy licence",false,GUIEditor_Window[2]) GUIEditor_Button[4] = guiCreateButton(196,165,152,29,"Close",false,GUIEditor_Window[2]) local weaponsTable = { {"Sniper",10,1200} } function setweps () for index, weapon in pairs(weaponsTable) do local row = guiGridListAddRow(GUIEditor_Grid[1]) guiGridListSetItemText (GUIEditor_Grid[1], row, GUIEditor_Column[1], weapon[1], false, true) guiGridListSetItemText (GUIEditor_Grid[1], row, GUIEditor_Column[2], weapon[2], false, true) guiGridListSetItemText (GUIEditor_Grid[1], row, GUIEditor_Column[3], weapon[3], false, true) end end addEventHandler ( "onClientResourceStart", resourceRoot, setweps )
×
×
  • Create New...