iFoReX Posted March 19, 2012 Share Posted March 19, 2012 I want do a DeathWarp GUI but I dont know the events or functions , now Im doing the GUI please help me Link to comment
Absence2 Posted March 19, 2012 Share Posted March 19, 2012 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 Link to comment
Sparrow Posted March 19, 2012 Share Posted March 19, 2012 elmota, you mean when player wasted show a gui where he can respawn? Link to comment
iFoReX Posted March 19, 2012 Author Share Posted March 19, 2012 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 Link to comment
Absence2 Posted March 19, 2012 Share Posted March 19, 2012 http://development.mtasa.com/index.php? ... awnmanager this? you can find resource @ https://community.multitheftauto.com if you don't want to try yourself This should give you an idea on how to do things. It's very detailed info. Link to comment
iFoReX Posted March 19, 2012 Author Share Posted March 19, 2012 Dont man death warp is when the player wasted and after he can spawn when he dead u understand me, and the community dont have scripts of deathwarping Link to comment
Absence2 Posted March 19, 2012 Share Posted March 19, 2012 this will spawn you in the middle of GTA SA world (x=0, y=0, z=3) after 2 seconds of your death addEventHandler( "onPlayerWasted", getRootElement( ), function() setTimer( spawnPlayer, 2000, 1, source, 0, 0, 3 ) end ) you mean this?? https://wiki.multitheftauto.com/wiki/OnPlayerWasted Link to comment
iFoReX Posted March 19, 2012 Author Share Posted March 19, 2012 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 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 Link to comment
Castillo Posted March 19, 2012 Share Posted March 19, 2012 You want to spawn the player when he presses the button "DeathWarp"? Link to comment
Castillo Posted March 19, 2012 Share Posted March 19, 2012 -- 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 ) Link to comment
iFoReX Posted March 19, 2012 Author Share Posted March 19, 2012 Ok man Thnx But 1 Problem Solid Wrote = -- Change 0, 0, 5 to your spawn coordinates. I dont understand it man Link to comment
Castillo Posted March 19, 2012 Share Posted March 19, 2012 0 = position X 0 = positionY 5 = positionZ Change them to your desired coordinates. Link to comment
iFoReX Posted March 19, 2012 Author Share Posted March 19, 2012 But this coordinates is for where Spawn ? Link to comment
iFoReX Posted March 19, 2012 Author Share Posted March 19, 2012 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 Link to comment
iFoReX Posted March 20, 2012 Author Share Posted March 20, 2012 Dont . I dont remember put the server-side in my meta.xml but dont Deathwarp only change the skin to 0 ( CJ ) Link to comment
Castillo Posted March 20, 2012 Share Posted March 20, 2012 It works as it should, it spawns me at the coordinates you've set. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now