-
Posts
1,803 -
Joined
-
Last visited
-
Days Won
8
Everything posted by Citizen
-
I knew that you didn't know what he said --' so I translated it for you ( I'm french )
-
Ok so is it possible to modify the clients folder of a server ?
-
=> why I can't hear the sounds ?
-
What actually are you trying to say with this link? You could ever explain, what he should take a look on. There are some more issues in his code, not only this one. He means that [sR]mR.EmiN have to see how to use this function ( so the syntax or the arguments needed )
-
You can't make that because the folder in the player computer can't be modified ( if is it modified, the server will resend the folder to the client ), so he can't put his songs in the folder. Maybe I'm wrong, I don't know.
-
I KNOW !!! This !!! addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), function() startShowingShopLevelMenu() bindKey ( "F2", "down", function( ) if (guiGetVisible(MainWindowLevel) == false) then guiSetVisible(MainWindowLevel,true) elseif (guiGetVisible(MainWindowLevel) == true) then guiSetVisible(MainWindowLevel,false) showCursor(false) end end ) end) AND THIS ! function startShowingShopLevelMenu() showCursor(true) GUIEditor_Window = {} GUIEditor_Grid = {} MainWindowLevel = guiCreateWindow(0.2234,0.0586,0.5969,0.9102,"New Skills Shop",true) MainButton = guiCreateButton(0.1289,0.9418,0.6974,0.0370,"Buy Skill",true,MainWindowLevel) MainGrid = guiCreateGridList(0.0419,0.0354,0.9058,0.8970,true,MainWindowLevel) guiGridListSetSelectionMode(MainGrid,1) guiGridListAddColumn(MainGrid,"ID",0.2) guiGridListAddColumn(MainGrid,"Name",0.2) guiGridListAddColumn(MainGrid,"$",0.2) guiGridListAddColumn(MainGrid,"Level",0.2) guiGridListAddColumn(MainGrid,"Status",0.2) if ( skillsID ) then if getElementData(getLocalPlayer(),"SkillBuy") == tonumber(skillsID) then outputChatBox("get element data") local textAddSkill = guiGridListSetItemText(MainGrid,tonumber(skillsID),5,"purchased",false,false) local textAddSkill2 = guiGridListSetItemColor (MainGrid,tonumber(skillsID),5,0,255,0) outputChatBox("text add "..tostring(textAddSkill).." , "..tostring(textAddSkill2)) end end guiSetVisible(MainWindowLevel, false ) addEventHandler ("onClientGUIClick", MainButton, onClientPlayerSkillBuy) for i,v in ipairs (skillsLevelsTable) do local row21 = guiGridListAddRow (MainGrid) guiGridListSetItemText (MainGrid, row21, 1, v[1], false, true) guiGridListSetItemText (MainGrid, row21, 2, v[2], false, true) guiGridListSetItemText (MainGrid, row21, 3, v[3], false, true) guiGridListSetItemText (MainGrid, row21, 4, v[4], false, true) guiGridListSetItemText (MainGrid, row21, 5, v[5], false, true) guiGridListSetItemText (MainGrid, row21, 6, v[6], false, true) end guiSetVisible( MainWindowLevel , false ) end Sorry for SHIFT but I already answered to your question 2 times. This code create the gui and hide it at the start and then just use F2
-
You doesn't help me because when I give you a code, you don't keep it And this time keep all codes if you are another problem
-
Are you really sure ? Ok try this: function getingPlayerBizPos() outputChatBox("getingPlayerBizPos" ) local result = mysql_query(handler, "SELECT * FROM tc_biznesy" ) if (result) then while true do local data = mysql_fetch_assoc(result) if (not data) then break end bizx = data["bizx"] bizy = data["bizy"] bizz = data["bizz"] bizid = data["id"] bizname = data["name"] for k,i in ipairs ( getElementsByType( "player" ) ) do triggerClientEvent(i, "playerPos", getRootElement(), bizx, bizy, bizz, bizname) end end mysql_free_result(result) end end setTimer( getingPlayerBizPos, 5000, 1 )
-
No but just in the X axis of the GTA world ( it's not Z instead ??? ) and you want the player's axis right ? and I seen an error ( fixed here ): if isPedOnGround( localPlayer ) then setElementPosition(localPlayer, a,b,c+1, false) end
-
I was sure of it ! You didn't make this: So this is the code with the setElementVisible at the end like I said function startShowingShopLevelMenu() showCursor(true) GUIEditor_Window = {} GUIEditor_Grid = {} MainWindowLevel = guiCreateWindow(0.2234,0.0586,0.5969,0.9102,"New Skills Shop",true) MainButton = guiCreateButton(0.1289,0.9418,0.6974,0.0370,"Buy Skill",true,MainWindowLevel) MainGrid = guiCreateGridList(0.0419,0.0354,0.9058,0.8970,true,MainWindowLevel) guiGridListSetSelectionMode(MainGrid,1) guiGridListAddColumn(MainGrid,"ID",0.2) guiGridListAddColumn(MainGrid,"Name",0.2) guiGridListAddColumn(MainGrid,"$",0.2) guiGridListAddColumn(MainGrid,"Level",0.2) guiGridListAddColumn(MainGrid,"Status",0.2) if ( skillsID ) then if getElementData(getLocalPlayer(),"SkillBuy") == tonumber(skillsID) then outputChatBox("get element data") local textAddSkill = guiGridListSetItemText(MainGrid,tonumber(skillsID),5,"purchased",false,false) local textAddSkill2 = guiGridListSetItemColor (MainGrid,tonumber(skillsID),5,0,255,0) outputChatBox("text add "..tostring(textAddSkill).." , "..tostring(textAddSkill2)) end end guiSetVisible(MainWindowLevel, false ) addEventHandler ("onClientGUIClick", MainButton, onClientPlayerSkillBuy) for i,v in ipairs (skillsLevelsTable) do local row21 = guiGridListAddRow (MainGrid) guiGridListSetItemText (MainGrid, row21, 1, v[1], false, true) guiGridListSetItemText (MainGrid, row21, 2, v[2], false, true) guiGridListSetItemText (MainGrid, row21, 3, v[3], false, true) guiGridListSetItemText (MainGrid, row21, 4, v[4], false, true) guiGridListSetItemText (MainGrid, row21, 5, v[5], false, true) guiGridListSetItemText (MainGrid, row21, 6, v[6], false, true) end guiSetVisible( MainWindowLevel , false ) end
-
Maybe try this: function getingPlayerBizPos() outputChatBox("getingPlayerBizPos" ) local result = mysql_query(handler, "SELECT * FROM tc_biznesy" ) if (result) then while true do local data = mysql_fetch_assoc(result) if (not data) then break end bizx = data["bizx"] bizy = data["bizy"] bizz = data["bizz"] bizid = data["id"] bizname = data["name"] triggerClientEvent("playerPos", getRootElement(), bizx, bizy, bizz, bizname) end mysql_free_result(result) end end -- addEventHandler("onResourceStart", getRootElement(), getingPlayerBizPos) setTimer( getingPlayerBizPos, 5000, 1 )
-
Show me your startShowingShopLevelMenu function please
-
Yeah that's strange, because I doesn't see any errors Maybe try this: function test( thePlayer, commandName ) local tag = "-|TG|-" local name = "-|TG|-Albinix" local subtag = string.gsub(tostring(name),tostring(tag),"") outputChatBox( tostring( subtag ) ) end addCommandHandler("test", test, false, false ) But it's almost the same
-
local savePlaces = {{249, 1230, 14},{249, 1230, 12},{249, 1230, 10}} function onSavePlaceHit( hitElement, matchingDimension ) outputChatBox("enter") end function createsavePlaces( thePlayer, matchingDimension ) for k,i in ipairs( savePlaces ) do local fX3 = savePlaces[k][1] local fY3 = savePlaces[k][2] local radius3 = savePlaces[k][3] savesPlacesCol = createColCircle ( fX3, fY3, radius3 ) -- create col shape outputChatBox("Col number "..k.." created !") addEventHandler ( "onColShapeHit", savesPlacesCol, onSavePlaceHit ) end end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), createsavePlaces )
-
What the hell ?! See this before: onMarkerHit Keep the marker, because it's the marker ( invisible if you want ) which detects a player or a vehicle: arrow1 = createObject(1318, 0, 0, 3, 0, 0, 0) theMarker = createMarker ( 0, 0, 3, "cylinder", 5, 255, 255, 255, 0 ) -- the last 0 is the Alpha ( 255 = full visible, 0 = invisible ) function attach ( hitElement ) if ( getElementType( hitElement ) == "vehicle" ) then attachElements ( hitElement, arrow1 ) else outputChatBox ( "Only vehicles can be attached here" ) end end addEventHandler ( "onMarkerHit", theMarker, attach ) function detach ( thePlayer, commandName ) local pVehicle = getPedOccupiedVehicle( thePlayer ) detachElements ( pVehicle ) end addCommandHandler ( "detach", detach )
-
function startShowingShopLevelMenu() -- blablabla guiSetVisible(MainWindowLevel, false ) end
-
Yeah sorry my bad, I forgot the ".png" local ran = math.random(1,3) outputChatBox("img/travelImage"..ran..".png") g_GUI['travelImage'] = guiCreateStaticImage(screenWidth/2-400, screenHeight/2-300,800, 600, "img/travelImage"..ran..".png", false)
-
Client: addEventHandler("gettingPos", getRootElement(), gettingPlayerPos) instead of: addEventHandler("gettingPos", getRootElement, gettingPlayerPos)
-
Ok I made some test, and you can't attach a vehicle to a marker but you can attach a marker to a vehicle so try to attach the vehicle to your boat