-
Posts
107 -
Joined
-
Last visited
Everything posted by #Madara
-
i should use all these to make it ? setElementDimension spawnPlayer setElementPosition setElementRotation setElementData getElementData createVehicle createObject xmlLoadFile xmlUnloadFile xmlNodeGetName xmlNodeGetAttribute xmlNodeGetChildren xmlNodeGetValue loadstring pcall setfenv triggerClientEvent triggerServerEvent triggerLatentClientEvent getLatentEventHandlers getLatentEventStatus getNetworkStats setCameraTarget setCameraMatrix setTimer showPlayerHudComponent getResources addEventHandler showChat showCursor setElementFrozen destroyElement
-
This is for multigamemode But i want to know how to make Race gamemode for dimension 2
-
hi guys , can i make gamemode race start to players who in Dimension 2 ?
-
انت خليه اذا ضغط زر الي يخش به تيم الشرطة يسوي ترايقر و يعطيه سلاح
-
يب زر للوحه استخدم : triggerServerEvent giveWeapon و اذا ماعرفت اطرح كود زر اللوحة
-
كيف يدخل التيم ؟ عن طريق زر أو الخ ....؟
-
https://community.multitheftauto.com/ind ... s&id=11851
-
وضح ؟ أكتب في أف 8 debugscript 3 وقول لنا وش يطلع لك
-
it's work now , but when the M is capital it's dosen't search and when is m small he search, i want when M is capital or m is small he can search .
-
i edit it and the search not work , this is my code : addEventHandler("onClientResourceStart", resourceRoot, function() Window = guiCreateWindow(504, 157, 358, 408, "Players In Server", false) guiWindowSetSizable(Window, false) guiSetAlpha(Window, 1.00) guiSetVisible( Window , false) GridList = guiCreateGridList(18, 82, 322, 306, false, Window) ID = guiGridListAddColumn(GridList, "# ID :", 0.1) Players = guiGridListAddColumn(GridList, "# Players :", 0.-- s8) --> Edit = guiCreateEdit(30, 34, 286, 38, "", false, Window) Search = guiCreateButton(320, 39, 29, 28, "Search", false, Window) guiSetFont(Search, "default-small") for id, v in ipairs(getElementsByType("player")) do local row = guiGridListAddRow(GridList) guiGridListSetItemText ( GridList, row, ID,tonumber(id), false, false ) guiGridListSetItemText ( GridList, row, Players,tostring(getPlayerName(v)), false, false ) end end ) function Default() for id, v in ipairs(getElementsByType("player")) do local row = guiGridListAddRow(GridList) guiGridListSetItemText ( GridList, row, ID,tonumber(id), false, false ) guiGridListSetItemText ( GridList, row, Players,tostring(getPlayerName(v)), false, false ) end end addEventHandler("onClientGUIChanged", root, function() if source == Edit then if ( guiGetText(source) == "") then return Default() end local row = guiGridListAddRow(GridList) guiGridListClear(GridList) for i, v in ipairs(getElementsByType"player") do if string.find(string.lower(string.gsub(getPlayerName(v), "#%x%x%x%x%x%x", "")), guiGetText(source)) then guiGridListSetItemText(GridList, row, Players, getPlayerName(v), false, false) guiGridListSetItemText ( GridList, row, ID,tonumber(i), false, false ) end end end end )
-
Hi Guys , How i Make Search in Gridlist When player write in Edit Example : when i write in edit madara he show to me the player his name madara i added all players in gridlist and everythink but now i want to know how to make search ?
-
خليت سترنق لأسم التيم وماضبط ؟ local theTeam = getTeamFromName ( Blue ) إلى local theTeam = getTeamFromName ( "Blue" ) أو جرب كود عقيد مع تعديلي for k, v in ipairs ( getElementsByType ( 'player' ) ) do if ( getPlayerTeam( getTeamName ( v ) == 'Blue' ) ) then local Row = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList, Row, 1, ''..i..'', false, false ) guiGridListSetItemText ( GridList, Row, 2, getPlayerName(v), false, false ) end end
-
when i make trigger i got this problem debugscript : Server.lua:14 : attempt to index 'V' (a userdata vaule) addEvent("Online",true) addEventHandler("Online",root, function(accounts) if v[1] ~= false then local row = guiGridListAddRow(GridList) guiGridListSetItemText(GridList, row, Admin, getPlayerName(v[1]).." - "..v[2], false, false) guiGridListSetItemText(GridList, row, Status, "Online", false, false) end end ) addEvent("Offline",true) addEventHandler("Offline",root, function(accounts) for i, v in pairs(accounts) do if v[1] == false then local row = guiGridListAddRow(GridList) guiGridListSetItemText(GridList, row, Admin, v[2], false, false) guiGridListSetItemText(GridList, row, Status, "Offline", false, false) end end end ) local accounts = { {'Madara'}, } addEvent("request",true) addEventHandler("request",root, function() setTimer(function() for i, v in ipairs(getAccounts()) do if getAccountPlayer(v) then accounts[v] = {getAccountPlayer(v), getAccountName(v)} triggerClientEvent("Online",source,accounts) else accounts[v] = {false, getAccountName(v)} triggerClientEvent("Offline",source,accounts) end end end,4000,0) end )
-
ok thank you very much .
-
ah thank you , i should use triggerClientEvent right ?
-
like this ? Client : addEventHandler("onClientResourceStart", resourceRoot, function() Window = guiCreateWindow(488, 225, 376, 229, "Admin's Online", false) guiWindowSetSizable(Window, false) guiSetAlpha(Window, 1.00) guiSetVisible(Window,false) GridList = guiCreateGridList(9, 24, 357, 195, false, Window) local Admin = guiGridListAddColumn(GridList, "# Admin :", 0.5) local Status = guiGridListAddColumn(GridList, "# Status :", 0.5) local row = guiGridListAddRow(GridList) end ) addEvent("Online",true) addEventHandler("Online",root, function(Account) for i, v in ipairs(Account) do guiGridListSetItemText(GridList, row, Admin, v.Account, false, false) guiGridListSetItemText(GridList, row, Status, "Online", false, false) end end ) addEvent("Offline",true) addEventHandler("Offline",root, function(Account) for i, v in ipairs(Account) do guiGridListSetItemText(GridList, row, Admin, v.Account, false, false) guiGridListSetItemText(GridList, row, Status, "Offline", false, false) end end ) Server : Account = { {'Madara'}, } addEventHandler("onPlayerLogin",root, function() for i, v in ipairs(getAccounts()) do if getAccountPlayer(v) then triggerClientEvent("Online",source,Account) -- ACCOUNT IS ONLINE - Account: v, Player: getAccountPlayer(v) else triggerClientEvent("Offline",source,Account) -- ACCOUNT IS OFFLINE - Account: v, Player: Unable to get player, because he is offline. end end )
-
like this ? Client : addEvent("Insert",true) addEventHandler("Insert",root, function(Account) for i, v in ipairs(Account) do local row = guiGridListAddRow(GridList) guiGridListSetItemText(GridList, row, Admin, v.Account, false, false) end end ) Server : Account = { {'Madara'}, } addEventHandler("onPlayerLogin",root, function(_,cAccount) for k , v in ipairs (Account) do local acc = getAccountPlayer(getAccounts(v)) if ( acc ) then triggerClientEvent("Insert",source,Account) end end end)
-
hi guys , i want to make script when Player his Account is added in table i create it and login then his Name will added in GridList and Near his name Online and if the Player is not in the server or logout his name will added in GridList and near his name Offline what functions i use ?
-
ah thank you very much
-
ok it's work now , i have problem in gridlist this is the problem : i want the message be next player name like this :
-
anyone can help me please ?
-
it's first and debugscript say to me ERROR: Server triggered clientside event addLogs, but event is not added clientside meta
