-
Posts
749 -
Joined
-
Last visited
-
Days Won
1
Everything posted by FlyingSpoon
-
- - CLIENT-SIDE addEventHandler("onClientPlayerWasted", getRootElement(), function () if source == localPlayer then spawnSystem() setElementHealth ( localPlayer, 100 ) triggerServerEvent ( "on.death", localPlayer ) end end) SERVER-SIDE function onPlayerDeath() takeAllWeapons ( source ) end addEvent("on.death", true) addEventHandler("on.death", getRootElement(), onPlayerDeath)) When I spawn as a new character, my health is still 0 and I am basically dead, why?
-
Nvm fixed it, I have just changed ped and stuff to dimension 0 and stuff, and moved it out of interior.
-
I'll send you it in PM, I don't want to share it.
-
I dont think so, because when I join the server it's perfect, but after I die, it's all black ;(
-
I am using setElementPositon function onDeath () if source == localPlayer then spawnSystem() triggerServerEvent ( "on.death", localPlayer ) end end addEventHandler("onClientPlayerWasted", getRootElement(), onDeath)
-
My spawn is like set in a interior etc, but when I did my screen is black why? And GUI shows up.
-
function spawnSystem() - end addEventHandler("onClientResourceStart", resourceRoot, spawnSystem) function onDeath () spawnSystem() triggerServerEvent ( "on.death", localPlayer ) end addEventHandler("onClientPlayerWasted", getRootElement(), onDeath)
-
function onDeath () spawnSystem() triggerServerEvent ( "on.death", localPlayer ) end addEventHandler("onClientPlayerWasted", getRootElement(), onDeath) Basically when a person dies, I want to re-open the gui function called - function spawnSystem() , but it doesn't open it up.
-
You see my code above which you set as an example, now when GUI closes etc, the camera is like in the air like it's all black and I can see the sun? setCameraMatrix(254.7190, -41.1370, 1002, 256.7190, -41.1370, 1002 ) function clickGrid() local row,col = guiGridListGetSelectedItem(mainGridlist) if (row and col and row ~= -1 and col ~= -1) then setElementModel ( dummyPed, 29 ) triggerServerEvent ( "zombie.hunters", localPlayer) guiSetVisible ( spawnMenu, false ) showCursor ( false ) destroyElement ( dummyPed ) setElementInterior ( localPlayer, 0 ) setElementDimension (localPlayer, 0 ) end end
-
Too late Figured it out. Anyways, thanks.
-
function clickGrid() local row, col = guiGridListGetSelectedItem ( mainGridlist ) if (row == 0) and (col == 1) then setElementModel ( dummyPed, 21 ) if source == spawnBtn then ---- elseif (row == 1) and (col == 1) then setElementModel ( dummyPed, 29 ) if source == spawnBtn then ---- elseif (row == 2) and (col == 1) then setElementModel ( dummyPed, 45 ) if source == spawnBtn then ---- elseif (row == 3) and (col == 1) then setElementModel ( dummyPed, 60 ) if source == spawnBtn then ---- end end end end end end addEventHandler("onClientGUIClick", resourceRoot, clickGrid) When I click first gridlist it works, but rest dont.
-
Yep! The GUI and everything appears!
-
It exists, Also no outputs, outputted! @ALw7sH
-
mysql_query(mysql, "INSERT INTO business ( 'name' ) VALUES ( '".. getBusName .." )" ) I even tried this, still nothing
-
Nothing
-
mysql = dbConnect( "mysql", "dbname=thedb;host=localhost", "root", "", "share=1" ) function createBusiness(getBusName) local insert = dbExec( mysql, "INSERT INTO business VALUES (name)", getBusName ) if (insert) then outputChatBox("Congratulations, you have created your business", source, 255, 194, 14) else outputDebugString("MySQL Error: Unable to create business!") end end addEvent("onBusinessCreate", true) addEventHandler("onBusinessCreate", getRootElement(), createBusiness) What if I was to do this? It still outputs no error
-
Huh? Doesnt work, and what about the other getBusName?
-
CLIENT SIDE function saveBusiness() if source == btnCreateBus then local getBusName = guiGetText ( edName ) if getBusName then triggerServerEvent("onBusinessCreate", getLocalPlayer(), getBusName) end end end addEventHandler("onClientGUIClick", resourceRoot, saveBusiness) SERVER SIDE mysql = exports.mysql function createBusiness(getBusName) mysql:query_free("INSERT INTO business (name)", getBusName) outputChatBox("Congratulations, you have created your business", source, 255, 194, 14) end addEvent("onBusinessCreate", true) addEventHandler("onBusinessCreate", getRootElement(), createBusiness) It outputs no errors? Any help would be appreciated, as I can then continue learning MySQL!
-
Well I have been asked this a lot, Do you need to learn DX Scripting to be a successful LUA Scripter? Many said yes, because GUI's are getting boring
-
What would be more better to learn? MySQL OR SQLite or SQL whatever it is called dbConnect one , ( Connecting to PHPMyAdmin database )
