Jump to content

Perfect

Members
  • Posts

    563
  • Joined

  • Last visited

Everything posted by Perfect

  1. Hi, I was making a script and I have came to a Problem, when i want to Disable/Reverse/Off cancelEvent(). Here is My Script:- function stopKnifeKill ( attacker, weapon, bodypart ) if ( weapon == 4 ) then cancelEvent() outputChatBox('#00ff0Server: Knife Godmode On!',source,0,255,0) else outputChatBox('#00ff00Server: Knife Godmode Off!',source,255,0,0,true) return false -- What should i do here to Disable cancelEvent ? end end addEventHandler ( "onClientPlayerDamage", root, stopKnifeKill ) addCommandHandler("kinfe",stopKnifeKill)
  2. Woah, Its have almost 1/3 lines of my code. Can you Please Explain me this ? local stat = getElementCollisionsEnabled(veh or player) setElementCollisionsEnabled(veh or player, not stat) outputChatBox("Server: Ghostmod: "..(stat and "on" or "off"), player, 0, 255, 0 ) Curious and a bit confused.
  3. I don't have skype. You can Pm me here in forum.Thanks for Trying.
  4. Not Compiling but making it Small and Better as you can it have Too Many ifelse.
  5. Hi, I am Trying to Make a Script, which will enable/disable player collision. I have made a script but i think its too big and it can be compress. Can you guys please compress it ? function ghost (playerSource, commandName, switch) local switch = true local veh = getPedOccupiedVehicle(playerSource) if ( switch == true and isPedInVehicle(playerSource) == false ) then setElementCollisionsEnabled(playerSource, true) outputChatBox("Server: Ghostmod: on", playerSource, 0, 255, 0 ) switch = false elseif (switch == false and isPedInVehicle(playerSource) == false) then setElementCollisionsEnabled(playerSource, false) switch = true outputChatBox("Server: Ghostmod: off", playerSource, 0, 255, 0 ) elseif ( switch == true isPedInVehicle(playerSource) == true) then setElementCollisionsEnabled(veh, true) switch = false outputChatBox("Server: Ghostmod: on", playerSource, 0, 255, 0 ) elseif (switch == false) then setElementCollisionsEnabled(veh, false) switch = true outputChatBox("Server: Ghostmod: off", playerSource, 0, 255, 0 ) end end addCommandHandler("ghost", ghost) (by compress i mean make it small, its have too many elseif)
  6. Perfect

    The last reply

    The Power Of Perfectness!
  7. Perfect

    Count to 1000

    he didn't mean with pictures he meant with numbers and words by saying I know, I'm not an idiot. But pictures are more enforced than numbers. Anyone can write "512". Five-Eleven 512. It Takes Little Bit Of Time and This Is Blast! EDIT: Lol, I Didn't See That This Is A Old Post/Thread But Still This Is Blast!!
  8. Perfect

    The last reply

    Ab-47, You Forgot I Am Perfect! Sometimes Cheese Dream About Me. (Let Me Win Again And Again!).
  9. Try (not tested) function speedup ( thePlayer ) if ( getTeamName ( getPlayerTeam ( thePlayer ) ) == "Unique" ) then local handlingTable = getVehicleHandling ( source ) local newVelocity = ( handlingTable [ "maxVelocity" ] + ( handlingTable [ "maxVelocity" ] / 100 * 700 ) ) setVehicleHandling ( source, "numberOfGears", 5 ) setVehicleHandling ( source, "driveType", 'awd' ) setVehicleHandling ( source, "maxVelocity", newVelocity ) setVehicleHandling ( source, "engineAcceleration", handlingTable [ "engineAcceleration" ] + 8 ) end end addEventHandler ( "onVehicleEnter", root, speedup )
  10. Perfect

    help

    try this:- server side addEventHandler("onPlayerQuit", root, function () timer = getElementData(localPlayer, "timer") outputDebugString("coie") end)
  11. You can uce IRC for that. (through it is in server owners hand)
  12. you mean like this ? GUIEditor = { tab = {}, tabpanel = {}, label = {}, button = {}, window = {}, memo = {} } --addEventHandler("onClientResourceStart", resourceRoot, function openAdminPanel() --remove openadminpanel when above part is applied GUIEditor.window[1] = guiCreateWindow(217, 14, 391, 524, "Server Help Page", false) guiWindowSetMovable(GUIEditor.window[1], false) guiWindowSetSizable(GUIEditor.window[1], false) showCursor(true) GUIEditor.tabpanel[1] = guiCreateTabPanel(10, 23, 371, 432, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Stuff", GUIEditor.tabpanel[1]) GUIEditor.tab[2] = guiCreateTab("Vehicle Commands", GUIEditor.tabpanel[1]) GUIEditor.tab[3] = guiCreateTab("Player Commands", GUIEditor.tabpanel[1]) GUIEditor.tab[4] = guiCreateTab("Rules", GUIEditor.tabpanel[1]) GUIEditor.memo[1] = guiCreateMemo(6, 8, 359, 389, "", false, GUIEditor.tab[1]) GUIEditor.memo[2] = guiCreateMemo(6, 8, 359, 389, "", false, GUIEditor.tab[2]) GUIEditor.memo[3] = guiCreateMemo(6, 8, 359, 389, "", false, GUIEditor.tab[3]) GUIEditor.memo[4] = guiCreateMemo(6, 8, 359, 389, "", false, GUIEditor.tab[4]) GUIEditor.button[1] = guiCreateButton(63, 472, 260, 29, "Close Server Help Page", false, GUIEditor.window[1]) end --) addEventHandler("onClientGUIClick",GUIEditor.button[1],closeHelpPage) addCommandHandler("helpMe",openAdminPanel) function closeHelpPage() guiSetVisible(GUIEditor.window[1],false) showCursor(false) end if yes then its not working. D:
  13. hi all, my gui button is not working here is the code GUIEditor = { tab = {}, tabpanel = {}, label = {}, button = {}, window = {}, memo = {} } --addEventHandler("onClientResourceStart", resourceRoot, function openAdminPanel() --remove openadminpanel when above part is applied GUIEditor.window[1] = guiCreateWindow(217, 14, 391, 524, "Server Help Page", false) guiWindowSetMovable(GUIEditor.window[1], false) guiWindowSetSizable(GUIEditor.window[1], false) showCursor(true) GUIEditor.tabpanel[1] = guiCreateTabPanel(10, 23, 371, 432, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Stuff", GUIEditor.tabpanel[1]) GUIEditor.tab[2] = guiCreateTab("Vehicle Commands", GUIEditor.tabpanel[1]) GUIEditor.tab[3] = guiCreateTab("Player Commands", GUIEditor.tabpanel[1]) GUIEditor.tab[4] = guiCreateTab("Rules", GUIEditor.tabpanel[1]) GUIEditor.memo[1] = guiCreateMemo(6, 8, 359, 389, "", false, GUIEditor.tab[1]) GUIEditor.memo[2] = guiCreateMemo(6, 8, 359, 389, "", false, GUIEditor.tab[2]) GUIEditor.memo[3] = guiCreateMemo(6, 8, 359, 389, "", false, GUIEditor.tab[3]) GUIEditor.memo[4] = guiCreateMemo(6, 8, 359, 389, "", false, GUIEditor.tab[4]) GUIEditor.button[1] = guiCreateButton(63, 472, 260, 29, "Close Server Help Page", false, GUIEditor.window[1]) end --) addCommandHandler("helpMe",openAdminPanel) function closeHelpPage() guiSetVisible(GUIEditor.window[1],false) showCursor(false) end addEventHandler("onClientGUIClick",GUIEditor.button[1],closeHelpPage)
  14. Guys Thnx so much!!! @TAPL Thnx for insisting me to learn how to trigger events. @Sasuke Thnx for Giving me the whole and final code. I really appreciate your help guys and i am gonna analyse that script and going to use in other scripts! Thank you (and btw @TAPL, i laughed so much when you said "You can't put a :~ in the code and expect it to work.". still laughing when remembering )
  15. ok. first, thnx for the code. and i tried my best as what you said. (btw this is my first time using trigger events) client function Dgun(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement) if weapon == 24 and hitElement and dgunStatus then if getElementType(hitElement) == "vehicle" then triggerServerEvent ( "devent", localPlayer) end end end addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), Dgun ) addCommandHandler("dgun", function() dgunStatus = not dgunStatus outputChatBox("Server: D-gun "..(dgunStatus and "On" or "Off").."!", 0, 255, 0, true) end) server function dgevent(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement) -- i am confused about this part. i have parameter in client side, so if i am trigger event then i must put those parameters in server side ?. destroyVehicle(hitElement) end addEvent("devent", true) addEventHandler("devent", root, dgevent) -- and here what is root,getRootElement() and sound. i mean what will happen if i put one of them ? i have got some questions too (see server file), hope you will help again
  16. damn, can you please give me a code ? (note that please)
  17. so you mean this will work ? client function Dgun ( weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement) if dgunStatus == false then dgunStatus = true; if weapon == 24 and getElementType(hitElement)=="vehicle" then outputChatBox("Server: D-gun On!",source,0,255,0,true) destroyElement ( target ) outputChatBox("Server: Destroyed!!",source,0,255,0,true) end else outputChatBox("Server: Destroyed!!",source,0,255,0,true) end end elseif dgunStatus == true then dgunStatus = false return false; addEventHandler ( "onClientPlayerWeaponFire", getLocalPlayer(), Dgun ) addCommandHandler("dgun",Dgun)
  18. its client side or server side ? and i tried both client and server side. it seems to not working, i change some things in script as per debugscript says here is the code.(no errors and no warnings and not working) function Dgun ( attacker, weapon, bodypart, loss) if dgunStatus == false then dgunStatus = true; if ( weapon == 24 ) then outputChatBox("Server: D-gun On!",source,0,255,0,true) for i, source in ipairs ( getElementsByType("player") ) do target = getPedTarget ( source ) if ( target ) then if ( getElementType ( target ) == "vehicle" ) then destroyElement ( target ) outputChatBox("Server: Destroyed!!",source,0,255,0,true) end end end end elseif dgunStatus == true then dgunStatus = false return false; end end addEventHandler ( "onVehicleDamage", getRootElement (), Dgun ) addCommandHandler("dgun",Dgun)
  19. hi all, i am trying to change deagle to a gun which destroy vehicle which we shoot at. i am trying to change that gun by command "dgun". so when we type dgun, it will change to destroying gun and when we type dgun again it will turn to normal gun. but unfortunately my code is not working, hope you guys can help me. here is the code function Dgun ( attacker, weapon, bodypart, loss) if ( weapon == 24 ) then outputChatBox("Server: D-gun On!",source,0,255,0,true) for i, source in ipairs ( getElementsByType("player") ) target = getPlayerTarget ( source ) if ( target ) then if ( getElementType ( target ) == "vehicle" ) then destroyElement ( target ) outputChatBox("Server: Destroyed!!",source,0,255,0,true) end end end end end addEventHandler ( "onVehicleDamage", getRootElement (), Dgun ) addCommandHandler("dgun",Dgun)
  20. Perfect

    Save system.

    there is any save system resource based on db in community ?
  21. Perfect

    Save system.

    can i use xml for that ? and they are not beginner example for dbexec (as i didn't found any). can you give me any beginning mysql page link ?
  22. Perfect

    Save system.

    can you give me simple example of it ? (i have never use those things)
×
×
  • Create New...