Jump to content

[HELP] Serverside and Cliet


Recommended Posts

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]) 

Edited by Guest
Link to comment
Oh yes i made a big Fault it's SetPlayerFightingStyle

Anyways i'll fix it on the Code but Solve the main Problem Please.

This function is deprecated. This means that its use is discouraged and that it might not exist in future versions, but there should be an alternative (usually more generic) way of performing what it once did.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...