Fist
Members-
Posts
433 -
Joined
-
Last visited
-
Days Won
2
Everything posted by Fist
-
Good job guys! Keep it up.
- 28 replies
-
- mtasa
- legacy build
- (and 6 more)
-
try this, but you will have to clear previous account data that saved lastlogin otherwise it will still show same thing. addEventHandler("onPlayerLogin", getRootElement(), function(_, theAccount) local timeAtm = getRealTime().timestamp local lastLogin = getAccountData(theAccount, "acc:lastLogin") or timeAtm local lastTime = getRealTime(lastLogin) local timeText = lastTime.year + 1900 .. ". " .. string.format("%02d", lastTime.month+1) .. ". " .. string.format("%02d", lastTime.monthday) .. " " .. string.format("%02d", lastTime.hour) .. ":" .. string.format("%02d", lastTime.minute) .. ":" .. string.format("%02d", lastTime.second) outputChatBox("Last login date: " .. timeText, source, 255, 255, 255, true) setAccountData(theAccount, "acc:lastLogin", timeAtm) end)
-
First time hearing about that game. I think better would be to export Chernarus from Arma2 with all the models but optimized so it won't lag (low size models). I'd suggest to actually make it smaller size aswell tbh 'cause then it would be easier to finish it and would speed process up, but it's definetly not an easy task but would be cool to see this map for MTA. Because then would be really cool to play DayZ on it and even any other type of gamemode especially which is like survival type, 'cause there is much places to explore. @CodyJ(L)
-
what? Refresh is not meant to restart your resource edited files, it only detects new added and/or deleted files that has been added or removed. To apply new script changes you have to use console command restart syntax: <restart yourresourcenamehere> it also can be used ingame but you will need acl admin for that.
-
MTASA wiki - offline copies / online mirrors
Fist replied to MX_Master's topic in Site/Forum/Discord/Mantis/Wiki related
Thanks mate! Was waiting for this. -
You need to order web hosting from same exact hosting with same IP address from that host what you ordered your MTA hosting. You can ask that by creating support ticket on their support page of the hosting and i'm sure if they aren't bad hosting they will give you nice deals and answers for this particular problem, also some hostings offer webhost with the gaming host aswell, maybe you already have that. You also gonna need some kind of knowledge about creating simple html/css web site, you can google that. There are many already premade scripts/codes which you can drag/drop in the websites directory, if you don't want to learn it by yourself.
-
as the title says, i need someone that can export me some models from Arma 2 game. If anyone can do this would be really nice. Any interests can reply here or send me a PM.
-
what? makes no sense. Try replacing updateWantedList with this one function updateWantedList() guiGridListClear(wantedlistgui.grid[1]); for _,v in pairs(getElementsByType("player")) do if (getPlayerWantedLevel(v) > 0) then local row = guiGridListAddRow(wantedlistgui.grid[1]); guiGridListSetItemText(wantedlistgui.grid[1],row,1,getPlayerName(v):gsub("#%x%x%x%x%x%x",""),false,false) guiGridListSetItemText(wantedlistgui.grid[1],row,2,getPlayerWantedLevel(v),false,false) end end if (guiGridListGetRowCount(wantedlistgui.grid[1]) == 0) then local row = guiGridListAddRow(wantedlistgui.grid[1]); guiGridListSetItemText(wantedlistgui.grid[1],row,1,"no players found with wanted levels",false,false) guiGridListSetItemText(wantedlistgui.grid[1],row,2,"",false,false) end end
-
btw i added buttons to the panel, i think you'd have easier use with this one. local sW,sH = guiGetScreenSize(); local wantedlistgui = {window={},grid={},button={}} local mwW,mwH = 500,500; wantedlistgui.window[1] = guiCreateWindow(sW*0.5-mwW/2,sH*0.5-mwH/2,mwW,mwH,"players with wanted stars",false); wantedlistgui.grid[1] = guiCreateGridList(0,25,mwW-5,mwH-65,false,wantedlistgui.window[1]); wantedlistgui.button[1] = guiCreateButton(0,mwH-40,mwW/2-17,30,"update gridlist",false,wantedlistgui.window[1]); wantedlistgui.button[2] = guiCreateButton(mwW/2-5,mwH-40,mwW/2+17,30,"close gui",false,wantedlistgui.window[1]); guiSetVisible(wantedlistgui.window[1],false) guiGridListAddColumn(wantedlistgui.grid[1],"Player",0.5); guiGridListAddColumn(wantedlistgui.grid[1],"Wanted Level",0.4); function updateWantedList() guiGridListClear(wantedlistgui.grid[1]); for _,v in pairs(getElementsByType("player")) do local wantedlevel = getPlayerWantedLevel(v); if (wantedlevel > 0) then local row = guiGridListAddRow(wantedlistgui.grid[1]); guiGridListSetItemText(wantedlistgui.grid[1],row,1,getPlayerName(v):gsub("#%x%x%x%x%x%x",""),false,false) guiGridListSetItemText(wantedlistgui.grid[1],row,2,wantedlevel,false,false) end end if (guiGridListGetRowCount(wantedlistgui.grid[1]) == 0) then local row = guiGridListAddRow(wantedlistgui.grid[1]); guiGridListSetItemText(wantedlistgui.grid[1],row,1,"no players found with wanted levels",false,false) guiGridListSetItemText(wantedlistgui.grid[1],row,2,"",false,false) end end addEventHandler("onClientGUIClick",root,function() if (source == wantedlistgui.button[1]) then updateWantedList(); elseif (source == wantedlistgui.button[2]) then guiSetVisible(wantedlistgui.window[1],false); showCursor(false); end end); addCommandHandler("wantedplayers",function() if not guiGetVisible(wantedlistgui.window[1]) then guiSetVisible(wantedlistgui.window[1],true); showCursor(true); updateWantedList(); end end);
-
omg, just add check variable if wanted level is more than 0.
-
lol accidently put 2 variables as local even tho they souldn't been local here is fixed code + added one more thing local sW,sH = guiGetScreenSize(); local wantedlistgui = {window={},grid={}} local mwW,mwH = 500,500; wantedlistgui.window[1] = guiCreateWindow(sW*0.5-mwW/2,sH*0.5-mwH/2,mwW,mwH,"players with wanted stars",false); wantedlistgui.grid[1] = guiCreateGridList(0,25,mwW-5,mwH-30,false,wantedlistgui.window[1]); guiSetVisible(wantedlistgui.window[1],false) guiGridListAddColumn(wantedlistgui.grid[1],"Player",0.5); guiGridListAddColumn(wantedlistgui.grid[1],"Wanted Level",0.4); function updateWantedList() guiGridListClear(wantedlistgui.grid[1]); for _,v in pairs(getElementsByType("player")) do local wantedlevel = getPlayerWantedLevel(v); if (wantedlevel > 0) then local row = guiGridListAddRow(wantedlistgui.grid[1]); guiGridListSetItemText(wantedlistgui.grid[1],row,1,getPlayerName(v):gsub("#%x%x%x%x%x%x",""),false,false) guiGridListSetItemText(wantedlistgui.grid[1],row,2,wantedlevel,false,false) end end if (guiGridListGetRowCount(wantedlistgui.grid[1]) == 0) then local row = guiGridListAddRow(wantedlistgui.grid[1]); guiGridListSetItemText(wantedlistgui.grid[1],row,1,"no players found with wanted levels",false,false) guiGridListSetItemText(wantedlistgui.grid[1],row,2,"",false,false) end end addCommandHandler("wantedplayers",function() if guiGetVisible(wantedlistgui.window[1]) then guiSetVisible(wantedlistgui.window[1],false); else guiSetVisible(wantedlistgui.window[1],true); updateWantedList(); end end);
-
will you ever learn how to do something by yourself ? This is dozen topic of you asking simple :~. but anyway this should work, not tested tho. local sW,sH = guiGetScreenSize(); local wantedlist = {window={},grid={}}; local mwW,mwH = 500,500; local wantedlist.window[1] = guiCreateWindow(sW*0.5-mwW/2,sH*0.5-mwH/2,mwW,mwH,"players with wanted stars",false); local wantedlist.grid[1] = guiCreateGridList(0,0,mwW-5,mwH-5,false,wantedlist.window[1]); guiGridListAddColumn(wantedlist.grid[1],"Player",0.5); guiGridListAddColumn(wantedlist.grid[1],"Wanted Level",0.4); function updateWantedList() guiGridListClear(wantedlist.grid[1]); for _,v in pairs(getElementsByType("player")) do local wantedlevel = getPlayerWantedLevel(v); if (wantedlevel > 0) then local row = guiGridListAddRow(wantedlist.grid[1]); guiGridListSetItemText(wantedlist.grid[1],row,1,getPlayerName(v):gsub("#%x%x%x%x%x%x",""),false,false) guiGridListSetItemText(wantedlist.grid[1],row,1,wantedlevel,false,false) end end end addCommandHandler("wantedplayers",function() if guiGetVisible(wantedlist.window[1]) then guiSetVisible(wantedlist.window[1],false); else guiSetVisible(wantedlist.window[1],true); updateWantedList(); end end);
-
@AnnaBelle this should work. BUT anyone won't be able to remove this tent unless you don't add one more check variable if player is admin. You'll have to do a bit more of coding then 'cause you can't not check that from client side. replace this function with your original addCommandHandler("tent",function(thePlayer) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)),aclGetGroup("Admin"))then local x,y,z = getElementPosition(thePlayer) local xr,yr,zr = getElementRotation(thePlayer) px,py,pz = getElementPosition(thePlayer) prot = getPedRotation(thePlayer) local offsetRot = math.rad(prot+90) local vx = px+1.5*math.cos(offsetRot) local vy = py+1.5*math.sin(offsetRot) local vz = pz+2 local vrot = prot+180 tent = createObject(964,vx,vy,z-1,0,0,vrot) setObjectScale(tent,1.0) tentCol = createColSphere(x,y,z,4) attachElements(tentCol,tent,0,0,0) setElementData(tentCol,"parent",tent) setElementData(tent,"parent",tentCol) setElementData(tentCol,"tent",true) setElementData(tentCol,"admintent",true) setElementData(tentCol,"vehicle",true) ------------------------------------------------// setElementData(tentCol,"M4A1 CCO",5000) ------------------------------------------------// outputChatBox("[TENT]#FFFFFFTent Spawned!",source,46,255,46,true) else outputChatBox("[TENT]#FFFFFFYou are not admin!",source,255,0,0,true) end end) and this in menu_client with your original code of tent --Menu_Client if itemName == "tent" then local col = getElementData(getLocalPlayer(),"currentCol") if getElementData(col,"admintent") then outputChatBox("Sorry, but this tent can only be removed by admin.") disableMenu(); return; end triggerServerEvent("removeTent",getLocalPlayer(),getElementData(col,"parent")) disableMenu() return end
-
just leave it as it is, you have to modify menu_client.lua file for dayz and then just find where "Remove Tent" function is and make it that it shows only for admins. You also gonna need to add new element data to that tent, something like "admintent" or "armybox" so that you can tell which tent you need to remove that "Remove Tent" function.
-
Haven't done anything like that by myself, but you have to use dbQuery to do this. Here is example, should be correct but not 100% sure 'cause haven't used mysql or sqlite so far. You can also check wiki for more examples. -- this inserts data to mydql or sqlite which ever you prefer dbQuery(dbConnection,"INSERT INTO your_prefered_table_name VALUES (?,?)","first data","second data"); -- you can also add numbers aswell instead of string -- this will recieve data from mysql or sqlite. dbQuery(dbConnection,"SELECT * FROM your_prefered_table_name");
-
try this or if are you using it on client side then just replace "player" with "localPlayer" if it's used only for local player local playerTeam = getPlayerTeam(player) local teamname = (getTeamName(playerTeam)) local team = "#00AAFF"..teamname
-
you could destroy original blip with destroyElement and then create your own.
-
Just replace getPlayerFromName("CodyJ") with player data to get account from variable data.
-
It won't work, it's not setElementData. You have to get account of the player not player itself. this should work. setAccountData(getPlayerAccount(getPlayerFromName("CodyJ")),"myZom",5000)
-
This is stupid to replace this with setElementData. You can easily make it secure by just adding simple anti cheat which has even example on the wiki.
-
If you didn't read carefuly enough function name is getAttachedElements not getAttachedElement. Just loop through that table it will get ALL attached elements, 'cause there can be more than 1 attached element to an element. Just in case if you have other elements attached to the projectile then just add check variable if element is the blip and then set blip color. for i,v in ipairs(getAttachedElements(yourProjectileElementHere) do setBlipColor(v,255,0,0,255); end