Jump to content

SkrillexX

Members
  • Posts

    50
  • Joined

  • Last visited

Everything posted by SkrillexX

  1. Give me a Function that I Could Use instead Of.
  2. Oh yes i made a big Fault it's SetPlayerFightingStyle Anyways i'll fix it on the Code but Solve the main Problem Please.
  3. What do you mean by "Defined At"
  4. Here it's a wrong script Full of Client and Server Functions. It's about Fightings skills Which will Depends On a gui. In the gui there's 6 buttons , in each one theres a Fighting Skill. When the player Click on the Fighting Skill button he'd like to take , But i was Confused and i didn't know how to separate it into a Client side and Server one. function fightGui() GUIEditor.window[1] = guiCreateWindow(334, 106, 677, 527, "Fighting skills", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.label[1] = guiCreateLabel(236, 77, 334, 25, "Choose your Fighting Skill :", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 61, 224, 4) GUIEditor.label[2] = guiCreateLabel(70, 121, 537, 25, "_______________", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(70, 173, 200, 76, "Standard", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "E7E0D903") GUIEditor.button[2] = guiCreateButton(407, 172, 200, 76, "Boxing", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "E7E0D903") GUIEditor.button[3] = guiCreateButton(407, 293, 200, 76, "Kung Fu", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[3], "default-bold-small") guiSetProperty(GUIEditor.button[3], "NormalTextColour", "E7E0D903") GUIEditor.button[4] = guiCreateButton(70, 293, 200, 76, "Grab kick", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[4], "default-bold-small") guiSetProperty(GUIEditor.button[4], "NormalTextColour", "E7E0D903") GUIEditor.button[5] = guiCreateButton(70, 421, 200, 76, "Knee Head", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[5], "default-bold-small") guiSetProperty(GUIEditor.button[5], "NormalTextColour", "E7E0D903") GUIEditor.button[6] = guiCreateButton(407, 421, 200, 76, "Elbows", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[6], "default-bold-small") guiSetProperty(GUIEditor.button[6], "NormalTextColour", "E7E0D903") end function grabkick() setPlayerFightingStyle ( thePlayer ,15 ) outputChatBox ("You Succefully Changed Your Fighting Skill." ,255 ,255 ,0 ) end addEventHandler ("OnClientGuiClick" ,GUIEditor.button[4]) function kungFu() setPlayerFightingStyle ( thePlayer ,6 ) outputChatBox ("You Succefully Changed Your Fighting Skill." ,255 ,255 ,0 ) end addEventHandler ("OnClientGuiClick" ,GUIEditor.button[3]) function Elbows() setPlayerFightingStyle ( thePlayer ,16 ) outputChatBox ("You Succefully Changed Your Fighting Skill." ,255 ,255 ,0 ) end addEventHandler ("OnClientGuiClick" ,GUIEditor.button[6]) function kneeHead() setPlayerFightingStyle ( thePlayer ,7 ) outputChatBox ("You Succefully Changed Your Fighting Skill." ,255 ,255 ,0 ) end addEventHandler ("OnCleintGuiClick" ,GUIEditor.button[5]) function Boxing() setPlayerFightingStyle ( thePlayer ,5 ) outputChatBox ("You Succefully Changed Your Fighting Skill." ,255 ,255 ,0 ) end addEventHandler ("OnClientGuiClick" ,GUIEditor.button[2]) function Standard() setPlayerFightingStyle ( thePlayer ,4 ) outputChatBox ("You Succefully Changed Your Fighting Skill." ,255 ,255 ,0 ) end addEventHandler ("OnclientGuiClick" ,GUIEditor.button[1])
  5. In this script theres two people Fighting. the first one who dies loose , So i'd like you to give me the correct use o this Event Since In this Case the Wasted Player isn't known Cause its one of the two fighters.
  6. I am working on a Script And I am Searching for a Client Side Event which is About "When the Player Dies" , the 2nd Problem that in My scripts theres two people Dueling so i"d like on the event To Say that the player who dies Can be one of both of them .. I hope you understood ..
  7. i fixed it. "10" MEans 10shots. it is separated on shots numbers
  8. When i tested your Code. Sawn-off kills with only 1 shot. What is the error
  9. i cannot understand "poor" and "std" and "pro" .. i didn't understood the wiki's explication. Can you help me?
  10. So the damage will be reduced by 10% of the total health ?
  11. Greeting Pros, Today i waned to make a script that reduces the Sawn-off Damage. I Searched for the related function which i think it was setWeaponProperty . Here's my code , i made everything on the server side. Serverside- function reduceP () weapon = getWeaponProperty(26, "pro", "damage") if ( weapon ) then setWeaponProperty (26, "poor", "damage" ) end end I'd be grateful if any of you help me since i am a new Lua worker.
  12. Hi all. I am working on a gate script but since the syntax wants the gate id , i searched for in the MTA wiki but i did not find it. Anyone could give me Gates IDs and thanks.
  13. I didn't really get it but thanks anyways.
  14. Hi all. I am new on scripting but here's my question. the lua sytnax of "addCommandHandler" is : addCommandHandler ("CommandName", CommandFunction ) in this case the player will type /commandName but i'd like to make a command where the player must do for exemple /spectate playerName i mean the command will have two parts . i'd like to know how i do that.
  15. Thanks for helping me all, but sorry , i am new .. btw this forum is for experienced scripters only ?
  16. in this script , i'd like to give 25 health to each player who hits the specified marker . when the player hits the marker , he must do /mk to get 25 health , that's if he got 1500$ at least since he will loose them after buying the health. i'd like to know why this script does not work. ik marker locations are put as "x y z" but i changed that while testing. clientside : addEventHandler ("OnResourceStart") function medicKit local theMarker = createMarker ( x, y, z, "cylinder", 0 255 0 ) end function MarkerHit outputChatBox ("Type /mk to buy 25% of Health") end addEventHandler ("OnPlayerMarkerHit", thePlayer) function CommandMk local getPlayerMoney (thePlayer) end if getPlayerMoney (thePlayer) >= 1500 then outputChatBox ("You bought 25% of health !") end if not getPlayerMoney (thePlayer) then outputChatBox ("You do not have enough money !") end addCommandHandler ("mk",player) Serverside : function payMe takePlayerMoney ( 1500 , thePlayer) end addEventHandler ("OnPlayerCommand" ,thePlayer) function Heal getElementHealth (thePlayer) setElementHealth ( thePlayer, getElementHealth(thePlayer) +25 ) end Any help is welcomed.
  17. Oh , i understood. thanks for help and Sorry i am beginner .
  18. In this script i'd like to give 100000$ to each player who does /peak . i do not know why this script doesn't work . Any help would be welcomed. function command () givePlayerMoney ( thePlayer, 100000 ) end addCommandHandler ("peak", player)
  19. Really thanks. it works /lock
  20. Ok , /debugscript 3 don't tell me any error anyways here are my server/client side codes. Serverside. function consoleGive ( thePlayer ) if getPlayerMoney ( thePlayer ) >= 6000 then takePlayerMoney ( thePlayer,6000 ) if not getPlayerMoney ( thePlayer ) >= 6000 then outputChatBox ("You do not have enough money!") giveWeapon ( thePlayer, 35, 1, true ) else outputChatBox(" You don't have money",thePlayer) end end addCommandHandler ( "rpg", consoleGive ) And the Clientside function consoleGive ( thePlayer, rpg, 35, 1 ) local status = giveWeapon ( thePlayer, 35, 1, true ) if ( not status ) then outputConsole ( "Failed to give weapon.", thePlayer ) end end addCommandHandler ( "rpg", consoleGive )
  21. Means the problem is only in the serverside ?
  22. Hi , i wanted to make a script that gives to the player an RPG when he types /rpg and he will loose 6000$. idk why it doesn't wprk , anyways , here's my code. Client-Side. function consoleGive ( thePlayer, rpg, 35, 1 ) local status = giveWeapon ( thePlayer, 35, 1, true ) -- attempt to give the weapon, forcing it as selected weapon if ( not status ) then -- if it was unsuccessful outputConsole ( "Failed to give weapon.", thePlayer ) -- tell the player end end addCommandHandler ( "rpg", consoleGive ) Server-Side. function payme() takePlayerMoney (6000 ,player) end addEventHandler ("OnPlayerCommand", player) Any help wuld be welcomed.
×
×
  • Create New...