Jump to content

Problem Deathwarp GUI


iFoReX

Recommended Posts

Posted

What exactly is a deathWarp?

if it is what I think it is, I guess these should help, I'm not even near sure though.

  
spawnPlayer 
triggerServerEvent 
  

Posted

Yeah sparrow and here is the GUI

GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Label = {} 
GUIEditor_Image = {} 
  
GUIEditor_Window[1] = guiCreateWindow(216,165,349,283,"GuiDeathWarping",false) 
guiWindowSetMovable(GUIEditor_Window[1],false) 
guiWindowSetSizable(GUIEditor_Window[1],false) 
GUIEditor_Button[1] = guiCreateButton(10,219,205,47,"DeathWarp",false,GUIEditor_Window[1]) 
guiSetFont(GUIEditor_Button[1],"sa-header") 
GUIEditor_Image[1] = guiCreateStaticImage(28,33,280,116,"images/logobkz.png",false,GUIEditor_Window[1]) 
GUIEditor_Label[1] = guiCreateLabel(39,146,272,28,"Server y GUI Creada por ElMota",false,GUIEditor_Window[1]) 
guiLabelSetColor(GUIEditor_Label[1],0, 255, 0) 
guiSetFont(GUIEditor_Label[1],"clear-normal") 
  
  
  
  

help me please :D

elMota/elFoReX De Vuelta En MTA *---------*

Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3

https://www.youtube.com/user/KillersGPs

430x73_FFFFFF_FF9900_000000_000000.png
Posted
Yeah sparrow and here is the GUI
GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Label = {} 
GUIEditor_Image = {} 
  
GUIEditor_Window[1] = guiCreateWindow(216,165,349,283,"GuiDeathWarping",false) 
guiWindowSetMovable(GUIEditor_Window[1],false) 
guiWindowSetSizable(GUIEditor_Window[1],false) 
GUIEditor_Button[1] = guiCreateButton(10,219,205,47,"DeathWarp",false,GUIEditor_Window[1]) 
guiSetFont(GUIEditor_Button[1],"sa-header") 
GUIEditor_Image[1] = guiCreateStaticImage(28,33,280,116,"images/logobkz.png",false,GUIEditor_Window[1]) 
GUIEditor_Label[1] = guiCreateLabel(39,146,272,28,"Server y GUI Creada por ElMota",false,GUIEditor_Window[1]) 
guiLabelSetColor(GUIEditor_Label[1],0, 255, 0) 
  
dont man and thnx but I have the GUI for spawn player because when the player dead spawned in the script of spawns of 50p 
guiSetFont(GUIEditor_Label[1],"clear-normal") 
  
  
  
  

help me please :D

dont man and thnx but I have the GUI for spawn player because when the player dead spawned in the script of spawns of 50p

elMota/elFoReX De Vuelta En MTA *---------*

Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3

https://www.youtube.com/user/KillersGPs

430x73_FFFFFF_FF9900_000000_000000.png
Posted

You want to spawn the player when he presses the button "DeathWarp"?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

-- client side:

GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Label = {} 
GUIEditor_Image = {} 
  
GUIEditor_Window[1] = guiCreateWindow(216,165,349,283,"GuiDeathWarping",false) 
guiWindowSetMovable(GUIEditor_Window[1],false) 
guiWindowSetSizable(GUIEditor_Window[1],false) 
GUIEditor_Button[1] = guiCreateButton(10,219,205,47,"DeathWarp",false,GUIEditor_Window[1]) 
guiSetFont(GUIEditor_Button[1],"sa-header") 
GUIEditor_Image[1] = guiCreateStaticImage(28,33,280,116,"images/logobkz.png",false,GUIEditor_Window[1]) 
GUIEditor_Label[1] = guiCreateLabel(39,146,272,28,"Server y GUI Creada por ElMota",false,GUIEditor_Window[1]) 
guiLabelSetColor(GUIEditor_Label[1],0, 255, 0) 
guiSetFont(GUIEditor_Label[1],"clear-normal") 
  
addEventHandler ( "onClientGUIClick", GUIEditor_Button[1], 
    function ( ) 
        triggerServerEvent ( "deathWarp", localPlayer ) 
    end 
    ,false 
) 

-- server side:

addEvent ( "deathWarp", true ) 
addEventHandler ( "deathWarp", root, 
    function ( ) 
        spawnPlayer ( source, 0, 0, 5 ) -- Change 0, 0, 5 to your spawn coordinates. 
    end 
) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

0 = position X 
0 = positionY 
5 = positionZ 

Change them to your desired coordinates.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

That's right.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

what are bad ?

Client-Side :

GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Label = {} 
GUIEditor_Image = {} 
  
GUIEditor_Window[1] = guiCreateWindow(216,165,349,283,"GuiDeathWarping",false) 
guiWindowSetMovable(GUIEditor_Window[1],false) 
guiWindowSetSizable(GUIEditor_Window[1],false) 
GUIEditor_Button[1] = guiCreateButton(10,219,205,47,"DeathWarp",false,GUIEditor_Window[1]) 
guiSetFont(GUIEditor_Button[1],"sa-header") 
GUIEditor_Image[1] = guiCreateStaticImage(28,33,280,116,"images/logobkz.png",false,GUIEditor_Window[1]) 
GUIEditor_Label[1] = guiCreateLabel(39,146,272,28,"Server y GUI Creada por ElMota",false,GUIEditor_Window[1]) 
guiLabelSetColor(GUIEditor_Label[1],0, 255, 0) 
guiSetFont(GUIEditor_Label[1],"clear-normal") 
  
addEventHandler ( "onClientGUIClick", GUIEditor_Button[1], 
    function ( ) 
        triggerServerEvent ( "deathWarp", localPlayer ) 
    end 
    ,false 
) 
  
   bindKey("F6","down", 
        function () 
            guiSetVisible(GUIEditor_Window[1], not guiGetVisible(GUIEditor_Window[1])) 
            showCursor(guiGetVisible(GUIEditor_Window[1])) 
        end 
    ) 

Server-Side :

addEvent ( "deathWarp", true ) 
addEventHandler ( "deathWarp", root, 
    function ( ) 
        spawnPlayer ( source, 680.07605, -2737.64502, 8.50925 ) 
    end 
) 

Problem in Console :

[2012-03-20 10:44:11] ERROR: Client triggered serverside event deathWarp, but event is not added serverside 
[2012-03-20 10:44:11] ERROR: Client triggered serverside event deathWarp, but event is not added serverside 
[2012-03-20 10:44:14] ERROR: Client triggered serverside event deathWarp, but event is not added serverside 
[2012-03-20 10:44:15] ERROR: Client triggered serverside event deathWarp, but event is not added serverside 
[2012-03-20 10:44:15] ERROR: Client triggered serverside event deathWarp, but event is not added serverside 
[2012-03-20 10:44:16] ERROR: Client triggered serverside event deathWarp, but event is not added serverside 
[2012-03-20 10:44:17] ERROR: Client triggered serverside event deathWarp, but event is not added serverside 
[2012-03-20 10:44:17] ERROR: Client triggered serverside event deathWarp, but event is not added serverside 
[2012-03-20 10:44:19] ERROR: Client triggered serverside event deathWarp, but event is not added serverside 

Pleaase help me :D

elMota/elFoReX De Vuelta En MTA *---------*

Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3

https://www.youtube.com/user/KillersGPs

430x73_FFFFFF_FF9900_000000_000000.png
Posted

Post your meta.xml.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

It works as it should, it spawns me at the coordinates you've set.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

You're welcome.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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...