-
Posts
2,753 -
Joined
-
Last visited
-
Days Won
18
Everything posted by Captain Cody
-
What Im considering is, creating a client side trailer system and syncing that between players. Controller will be either the driver of the truck towing, or the closest player. Will need a lot of testing but should work out massively better then the system currently in place.
-
Im going to do some experimenting with this and depending on how it goes I'll be releasing a fix for it.
-
This is a mod, look up enter-able vehicles and find the androma from it.
-
Your topic is messed up for those of us running the dark theme, you may want to reset formatting.
-
May you please put this in a properly formatted lua bracket? After you do that I'll be glad to help you.
-
Looks like your graphics card might be coming close to an end.
-
I fund my server by doing paid conversions and occasional scripts; I'm going to show how to use Jstreamer 2.0 but that's it.
- 154 replies
-
- lc
- carmageddon
-
(and 1 more)
Tagged with:
-
The raw files have been posted on the gta modding forum, however it requires a massively powerful computer to load it up and actually properly convert it to SA. Also note - JStreamer 2.0 is out and LC has been updated to run it, I have updated the rest of the maps however my graphics card died before I could upload them all, I'm going to update them as soon as I am able to get a new graphics card.
- 154 replies
-
- lc
- carmageddon
-
(and 1 more)
Tagged with:
-
Can server drive car without non-player control?
Captain Cody replied to Siberhecy's topic in Scripting
Peds. Requires alot of work though to make them function without lag. Throughout the community there are a couple of resources. By default MTA has a 'Traffic' resource that you can try. -
Uses an unknown format.
-
Oh I think it only supports .map I'll be making a new map editor soon that will support .lua and .jsp (jsp being my own file definition)
-
Its an incredibly easy task plus there are a lot of converters (cannot link since I'm on tablet)
-
Please move this to support as well as provide more details.
-
It may seem unrelated; however, this sounds like an issue with models streaming in (As you move camera different models stream in) so you may want to try running this as administrator https://mirror.multitheftauto.com/mtasa/utils/servicing.bat then restart your computer. As mentioned by Dutchman in a previous topic 'MTA relies on WMI (winmgmt service) to assign streaming memory to the game'
-
Well there are plenty of servers out there, depends on your preferences. (RPG, Racing, Death Match, Freeroam, ect) as for friends list best way to keep track of that is by using discord or some similar messaging app, there is no built in system. Best advice really is to try to find 'Mature' communities not particularly older ones, but ones that aren't filled with a bunch of 8 year olds. (If you would like you could check out mine we'll be going live in a couple of months) other then that the games just like any other older game, be aware that there are a bunch of immature players with computers made pre 2000's.
-
print_ = print print = outputChatBox exports.scoreboard:scoreboardAddColumn ( "VIP", root, 50, "VIP", 12 ) for i, v in pairs ( getElementsByType ( "player" ) ) do if ( not getElementData ( v, "VIP" ) ) then setElementData ( v, "VIP", "None" ) end end addEventHandler ( "onPlayerJoin", root, function ( ) setElementData ( source, "VIP", "None" ) end ) -- VIP Chat -- addCommandHandler ( "vipchat", function ( p, cmd, ... ) if ( not isPlayerVIP ( p ) ) then return exports.NGMessages:sendClientMessage ( "This command is for VIP users only", p, 255, 0, 0 ) end if ( isPlayerMuted ( p ) ) then return exports.NGMessages:sendClientMessage ( "This command is disabled when you're muted", p, 255, 255, 0 ) end if ( not getElementData ( p, "userSettings" )['usersetting_display_vipchat'] ) then return exports.NGMessages:sendClientMessage ( "Please enable VIP chat in your phone settings to use this command.", 0, 255, 255 ) end local msg = table.concat ( { ... }, " " ) if ( msg:gsub ( " ", "" ) == "" ) then return exports.NGMessages:sendClientMessage ( "Syntax: /"..tostring(cmd).." [message]", p, 255, 255, 0 ) end local tags = "(VIP)"..tostring(exports.NGChat:getPlayerTags ( p )) local msg = tags..getPlayerName ( p )..": #ffffff"..msg for i,v in pairs ( getElementsByType ( 'player' ) ) do if ( ( isPlayerVIP ( v ) or exports.NGAdministration:isPlayerStaff ( p ) ) and getElementData ( v, "userSettings" )['usersetting_display_vipchat'] ) then outputChatBox ( msg, v, 200, 200, 0, true ) end end end ) function checkPlayerVipTime ( p ) local vip = getElementData ( p, "VIP" ) if ( vip == "None" ) then return end local expDate = getElementData ( p, "NGVIP.expDate" ) or "0000-00-00" -- Format: YYYY-MM-DD if ( isDatePassed ( expDate ) ) then setElementData ( p, "VIP", "None" ) setElementData ( p, "NGVIP.expDate", "0000-00-00" ) exports.NGMessages:sendClientMessage ( "Your VIP time has been expired.", p, 255, 0, 0 ) end end function checkAllPlayerVIP ( ) for i, v in pairs ( getElementsByType ( "player" ) ) do checkPlayerVipTime ( v ) end end function isPlayerVIP ( p ) checkPlayerVipTime ( p ) return tostring ( getElementData ( p, "VIP" ) ):lower ( ) ~= "none" end function getVipLevelFromName ( l ) local levels = { ['none'] = 0, ['bronze'] = 1, ['silver'] = 2, ['gold'] = 3, ['premium'] = 4 } return levels[l:lower()] or 0; end ------------------------------------------ -- Give VIP players free cash -- ------------------------------------------ local payments = { [1] = 25000, [2] = 50000, [3] = 100000, [4] = 150000 } VipPayoutTimer = setTimer ( function ( ) exports.NGLogs:outputServerLog ( "Sending out VIP cash...." ) print_ ( "Sending out VIP cash...." ) outputDebugString ( "Sending VIP cash" ) for i, v in ipairs ( getElementsByType ( "player" ) ) do if ( isPlayerVIP ( v ) ) then local l = getVipLevelFromName ( getElementData ( v, "VIP" ) ) local money = payments [ l ] givePlayerMoney ( v, money ) exports.NGMessages:sendClientMessage ( "Here is a free $"..money.." for being a VIP player!", v, 0, 255, 0 ) end end end, (60*60)*1000, 0 ) function getVipPayoutTimerDetails ( ) return getTimerDetails ( VipPayoutTimer ) end function isDatePassed ( date ) -- date format: YYYY-MM-DD local this = { } local time = getRealTime ( ); this.year = time.year + 1900 this.month = time.month + 1 this.day = time.monthday local old = { } local data = split ( date, "-" ) old.year = data[1]; old.month = data[2]; old.day = data[3]; for i, v in pairs ( this ) do this [ i ] = tonumber ( v ) end for i, v in pairs ( old ) do old [ i ] = tonumber ( v ) end if ( this.year > old.year ) then return true elseif ( this.year == old.year and this.month > old.month ) then return true elseif ( this.year == old.year and this.month == old.month and this.day > old.day ) then return true end return false end addEventHandler( "onResourceStart", resourceRoot, function ( ) checkAllPlayerVIP ( ) setTimer ( checkAllPlayerVIP, 120000, 0 ) end ) --[[ Bronze: - Laser - Able to warp vehicle to you - Additional 6 vehicles in spawners - $25000/hour - 5% less jail time Silver: - Laser - Able to warp your vehicle to you - Additional 6 vehicles in spawners - $50000/hour - 15% less jail time Gold: - Laser - Able to warp your vehicle to you - Additional 6 vehicles in spawner - $100000/hour - %25 less jail time diamond: - Laser - Able to warp your vehicle to you - Additional 6 vehicles in spawners - $150000/hour - Half jail time ]] function giveVIPNOS(p) if isPlayerVIP(p) then local level = getVipLevelFromName(getElementData(p,"VIP")) if level == 2 then addVehicleupgrade(source, 1009) elseif level == 3 then addVehicleupgrade(source, 1008) elseif level == 4 then addVehicleupgrade(source, 1010) end end end addEventHandler("onVehicleEnter", root, giveVIPNOS) function giveVIPJetPack(p) if isPlayerVIP(p) then local level = getVipLevelFromName(getElementData(p,"VIP")) if level == 3 or level == 4 then if not doesPedHaveJetPack(p) then givePedJetPack(p) else removePedJetPack(p) end else return exports["NGMessages"]:sendClientMessage("You are not gold vip or premium!", p, 255, 0, 0) end else return exports["NGMessages"]:sendClientMessage("You are not vip !", p, 255, 0, 0) end end bindKey(source, "j", "both", giveVIPJetPack) Replaced bronze, gold, ect with their corresponding numbers that getVipLevelFromName outputs.
-
[HELP] I want arpear the rank name not level string
Captain Cody replied to Dimos7's topic in Scripting
Ranks = { ['Level 1'] = {"Trial Staff"} , ['Level 2'] = {"Moderator"} , ['Level 3'] = {"Super Moderator"}, ['Level 4'] = {"Co- Ownwer"}, ['Level 5'] = {"Ownwer"} , } function isInAcl(player) for i,v in pairs(Ranks) do if isPlayerInACL ( p, v[1] ) then return true end end end function isPlayerStaff ( p ) if ( p and getElementType ( p ) == 'player' ) then if ( isInAcl(p) or isPlayerInACL ( p, "Admin" ) or isPlayerInACL ( p, "Console" ) ) then return true end return false end end function getPlayerStaffLevel ( p, var ) if ( isPlayerStaff ( p ) ) then local str = nil local num = nil for i=1,#Ranks do if ( isPlayerInACL ( p, Ranks['Level '..tostring ( i )][1] ) ) then num = i str = 'Level '..tostring ( i ) -- OR Ranks['Level '..tostring ( i )][1] break end end if ( var == 'string' ) then return str elseif ( var == 'int' ) then return num else return str, num end end return 0,0 end function getAllStaff ( ) staff = { ['Level 1'] = {} , ['Level 2'] = {} , ['Level 3'] = {}, ['Level 4'] = {}, ['Level 5'] = {} , } for i=1,#Ranks do for k, v in ipairs ( aclGroupListObjects ( aclGetGroup ( Ranks['Level '..tostring ( i )][1] ) ) ) do if ( string.find ( tostring ( v ), 'user.' ) ) then local name = tostring ( v:gsub ( "user.", "" ) ) staff[Ranks['Level '..tostring ( i )][1]][#staff[Ranks['Level '..tostring ( i )][1]]+1] = name end end end return staff end function isPlayerInACL ( player, acl ) local account = getPlayerAccount ( player ) if ( isGuestAccount ( account ) ) then return false end if ( aclGetGroup ( acl ) ) then return isObjectInACLGroup ( "user."..getAccountName ( account ), aclGetGroup ( acl ) ) end return false; end function getOnlineStaff ( ) local online = { } for i, v in ipairs ( getElementsByType ( "player" ) ) do if ( isPlayerStaff ( v ) ) then table.insert ( online, v ) end end return online end -- NG 1.1.4 -- -- Set element data to make getting staff on client side -- function setNewPlayerStaffData ( p ) if ( isPlayerStaff ( p ) ) then setElementData ( p, "staffLevel", getPlayerStaffLevel ( p, 'int' ) ) else setElementData ( p, 'staffLevel', 0 ) end end addEventHandler ( "onPlayerLogin", root, function ( ) setNewPlayerStaffData ( source ) end ); addEventHandler ( "onResourceStart", resourceRoot, function ( ) for _, p in pairs ( getElementsByType ( "player" ) ) do setNewPlayerStaffData ( p ) end end ) -
Certain object IDs have a breakable flag that cannot be disabled. Try another ID. Interestingly though https://dev.prineside.com/en/gtasa_samp_model_id/model/16775-door_savhangr2/ displays a non breakable flag.
-
I'll be releasing new streamer on the 1st. Also, I've added some modified VCS neons to VC.
- 154 replies
-
- 3
-
-
- lc
- carmageddon
-
(and 1 more)
Tagged with:
-
[HELP] I want arpear the rank name not level string
Captain Cody replied to Dimos7's topic in Scripting
Please explain better what you are attempting to do. -
May you explain better what you want?
-
'Good' file structures differ from person to person one scripter may put everything in one script, one in one resource, another in multiple resources. It highly depends on preference. Performance wise, I believe multiple resources wins though.
-
Add this function pickupUse ( player ) if getElementModel(source) == 1212 then givePlayerMoney ( player, 10000 ) end end addEventHandler ( "onPickupUse", resourceRoot, pickupUse )
-
It's linked in the comment section of the original script. I can help when I return home if no one else does.
-
[LF] Need Scripter For Create RPG GameMode [Paid]
Captain Cody replied to PicoBella's topic in Looking for staff
Be patient, it's late at night for most people at the moment.
