Na hello! egy nagy kérdésem lenne mégpedig, hol kell beállítani hogy az LSPD-system meik frakció id-t kérje le? átfutottam az összes scriptet sehol sem találom. így nem tudom használni a /berak /arrest /ticket parancsokat.
Na hello! egy nagy kérdésem lenne mégpedig, hol kell beállítani hogy az LSPD-system meik frakció id-t kérje le? átfutottam az összes scriptet sehol sem találom. így nem tudom használni a /berak /arrest /ticket parancsokat. lspd-system mappa > pdcommands.lua, pdcommands2.lua [/quote]na máshogy a helyzet. pdcommand.lua van, megolda |pdcommands2.lua nincs. | arrest a policejail és policejail2 ben így fest: -- /arrestfunction arrestPlayer(thePlayer, commandName, targetPlayerNick, fine, jailtime, ...)local logged = getElementData(thePlayer, \"loggedin\")if (logged==1) thenlocal theTeam = getPlayerTeam(thePlayer)local factionType = getElementData(theTeam, \"type\")local teamID = getElementData(theTeam, \"id\")if (jailtime) then jailtime = tonumber(jailtime)endlocal playerCol = isInArrestColshape(thePlayer)if (factionType==2) and playerCol then if not (targetPlayerNick) or not (fine) or not (jailtime) or not (...) or (jailtime<1) or (jailtime>9999999) then outputChatBox(\"HASZNÁLAT: /arrest [Játékos Névrészlet / ID] [bírság] [idő (Perc 1->9999999)] [Elkövetett bűn]\", thePlayer, 255, 194, 14) else local targetPlayer, targetPlayerNick = exports.global:findPlayerByPartialNick(thePlayer, targetPlayerNick) if targetPlayer then local targetCol = isInArrestColshape(targetPlayer) if not targetCol then outputChatBox(\"(( A rab nincs a letartóztatási helyen! ))\", thePlayer, 255, 0, 0) elseif targetCol ~= playerCol then outputChatBox(\"(( A rab nincs a letartóztatási helyen! ))\" , thePlayer, 255, 0, 0) else local jailTimer = getElementData(targetPlayer, \"pd.jailtimer\") local username = getPlayerName(thePlayer) local reason = table.concat({...}, \" \") if (jailTimer) then outputChatBox(\"(( A játékos már börtönben van! ))\", thePlayer, 255, 0, 0) else local finebank = false local targetPlayerhasmoney = exports.global:getMoney(targetPlayer, true) local amount = tonumber(fine) mysql:query_free(\"UPDATE characters SET money = money - \" .. amount .. \" WHERE id = \" .. getElementData( targetPlayer, \"dbid\" ) ) setPlayerMoney(targetPlayer, getPlayerMoney(targetPlayer) - amount) local theTimer = setTimer(timerPDUnjailPlayer, 60000, 1, targetPlayer) exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"pd.jailserved\", 0, false) exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"pd.jailtime\", jailtime, false) exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"pd.jailtimer\", theTimer, false) toggleControl(targetPlayer,\'next_weapon\',false) toggleControl(targetPlayer,\'previous_weapon\',false) toggleControl(targetPlayer,\'fire\',false) toggleControl(targetPlayer,\'aim_weapon\',false) local restrainedObj = getElementData(targetPlayer, \"restrainedObj\") if restrainedObj then toggleControl(targetPlayer, \"sprint\", true) toggleControl(targetPlayer, \"jump\", true) toggleControl(targetPlayer, \"accelerate\", true) toggleControl(targetPlayer, \"brake_reverse\", true) exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"restrain\", 0) exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"restrainedBy\") exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"restrainedObj\") if restrainedObj == 45 then local dbid = getElementData(targetPlayer, \"dbid\") exports[\'item-system\']:deleteAll(47, dbid) end exports.global:giveItem(thePlayer, restrainedObj, 1) mysql:query_free(\"UPDATE characters SET cuffed = 0, restrainedby = 0, restrainedobj = 0 WHERE id = \" .. mysql:escape_string(getElementData( targetPlayer, \"dbid\" )) ) end setPedWeaponSlot(targetPlayer,0) exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"pd.jailstation\", targetCol) mysql:query_free(\"UPDATE characters SET pdjail=\'1\', pdjail_time=\'\" .. mysql:escape_string(jailtime) .. \"\', pdjail_station=\'\" .. mysql:escape_string(targetCol) .. \"\', cuffed = 0, restrainedby = 0, restrainedobj = 0 WHERE id = \" .. mysql:escape_string(getElementData( targetPlayer, \"dbid\" )) ) outputChatBox(\"(( Letartóztattad \" .. targetPlayerNick .. \"-t \" .. jailtime .. \" percre. ))\", thePlayer, 255, 0, 0) setElementPosition(targetPlayer, 546.1142578125, -39.0595703125, 131.1242980957) setElementDimension(targetPlayer, 77 ) setElementInterior(targetPlayer, 11 ) setPedRotation(targetPlayer, 0) setElementFrozen(source, false) exports.global:givePlayerAchievement(thePlayer, 7) exports.global:givePlayerAchievement(targetPlayer, outputChatBox(\"(( \" .. username .. \" letartóztatott téged \" .. jailtime .. \" percre! ))\", targetPlayer, 0, 102, 255) outputChatBox(\"(( Vád(ak): \" .. reason .. \". ))\", targetPlayer, 0, 102, 255) takeAllWeapons ( targetPlayer ) SendMessageToTeam(\"Országos Rendőr Fő-kapitányság\", \"(( \" .. username .. \" letartóztatta \" .. targetPlayerNick .. \"-t! ))\", 0, 102, 255) SendMessageToTeam(\"Országos Rendőr Fő-kapitányság\",\"(( Vád(ak): \" .. reason .. \". ))\", 0, 102, 255) SendMessageToTeam(\"Országos Rendőr Fő-kapitányság\",\"(( Bírság: \" .. fine .. \" Ft. ))\", 0, 102, 255) toggleAllControls ( targetPlayer, true, true, true ) exports.logs:logMessage(\"[PD/ARREST] \" .. username .. \" letartoztatta \" .. targetPlayerNick .. \"-t. Ido: \" .. jailtime .. \" perc. Oka: \"..reason , 30) end end end endendendendaddCommandHandler(\"arrest\", arrestPlayer) Nem megy
-- /arrestfunction arrestPlayer(thePlayer, commandName, targetPlayerNick, fine, jailtime, ...)local logged = getElementData(thePlayer, \"loggedin\")if (logged==1) thenlocal theTeam = getPlayerTeam(thePlayer)local factionType = getElementData(theTeam, \"type\")local teamID = getElementData(theTeam, \"id\")if (jailtime) then jailtime = tonumber(jailtime)endlocal playerCol = isInArrestColshape(thePlayer)if (factionType==2) and playerCol then if not (targetPlayerNick) or not (fine) or not (jailtime) or not (...) or (jailtime<1) or (jailtime>9999999) then outputChatBox(\"HASZNÁLAT: /arrest [Játékos Névrészlet / ID] [bírság] [idő (Perc 1->9999999)] [Elkövetett bűn]\", thePlayer, 255, 194, 14) else local targetPlayer, targetPlayerNick = exports.global:findPlayerByPartialNick(thePlayer, targetPlayerNick) if targetPlayer then local targetCol = isInArrestColshape(targetPlayer) if not targetCol then outputChatBox(\"(( A rab nincs a letartóztatási helyen! ))\", thePlayer, 255, 0, 0) elseif targetCol ~= playerCol then outputChatBox(\"(( A rab nincs a letartóztatási helyen! ))\" , thePlayer, 255, 0, 0) else local jailTimer = getElementData(targetPlayer, \"pd.jailtimer\") local username = getPlayerName(thePlayer) local reason = table.concat({...}, \" \") if (jailTimer) then outputChatBox(\"(( A játékos már börtönben van! ))\", thePlayer, 255, 0, 0) else local finebank = false local targetPlayerhasmoney = exports.global:getMoney(targetPlayer, true) local amount = tonumber(fine) mysql:query_free(\"UPDATE characters SET money = money - \" .. amount .. \" WHERE id = \" .. getElementData( targetPlayer, \"dbid\" ) ) setPlayerMoney(targetPlayer, getPlayerMoney(targetPlayer) - amount) local theTimer = setTimer(timerPDUnjailPlayer, 60000, 1, targetPlayer) exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"pd.jailserved\", 0, false) exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"pd.jailtime\", jailtime, false) exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"pd.jailtimer\", theTimer, false) toggleControl(targetPlayer,\'next_weapon\',false) toggleControl(targetPlayer,\'previous_weapon\',false) toggleControl(targetPlayer,\'fire\',false) toggleControl(targetPlayer,\'aim_weapon\',false) local restrainedObj = getElementData(targetPlayer, \"restrainedObj\") if restrainedObj then toggleControl(targetPlayer, \"sprint\", true) toggleControl(targetPlayer, \"jump\", true) toggleControl(targetPlayer, \"accelerate\", true) toggleControl(targetPlayer, \"brake_reverse\", true) exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"restrain\", 0) exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"restrainedBy\") exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"restrainedObj\") if restrainedObj == 45 then local dbid = getElementData(targetPlayer, \"dbid\") exports[\'item-system\']:deleteAll(47, dbid) end exports.global:giveItem(thePlayer, restrainedObj, 1) mysql:query_free(\"UPDATE characters SET cuffed = 0, restrainedby = 0, restrainedobj = 0 WHERE id = \" .. mysql:escape_string(getElementData( targetPlayer, \"dbid\" )) ) end setPedWeaponSlot(targetPlayer,0) exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"pd.jailstation\", targetCol) mysql:query_free(\"UPDATE characters SET pdjail=\'1\', pdjail_time=\'\" .. mysql:escape_string(jailtime) .. \"\', pdjail_station=\'\" .. mysql:escape_string(targetCol) .. \"\', cuffed = 0, restrainedby = 0, restrainedobj = 0 WHERE id = \" .. mysql:escape_string(getElementData( targetPlayer, \"dbid\" )) ) outputChatBox(\"(( Letartóztattad \" .. targetPlayerNick .. \"-t \" .. jailtime .. \" percre. ))\", thePlayer, 255, 0, 0) setElementPosition(targetPlayer, 546.1142578125, -39.0595703125, 131.1242980957) setElementDimension(targetPlayer, 77 ) setElementInterior(targetPlayer, 11 ) setPedRotation(targetPlayer, 0) setElementFrozen(source, false) exports.global:givePlayerAchievement(thePlayer, 7) exports.global:givePlayerAchievement(targetPlayer, outputChatBox(\"(( \" .. username .. \" letartóztatott téged \" .. jailtime .. \" percre! ))\", targetPlayer, 0, 102, 255) outputChatBox(\"(( Vád(ak): \" .. reason .. \". ))\", targetPlayer, 0, 102, 255) takeAllWeapons ( targetPlayer ) SendMessageToTeam(\"Országos Rendőr Fő-kapitányság\", \"(( \" .. username .. \" letartóztatta \" .. targetPlayerNick .. \"-t! ))\", 0, 102, 255) SendMessageToTeam(\"Országos Rendőr Fő-kapitányság\",\"(( Vád(ak): \" .. reason .. \". ))\", 0, 102, 255) SendMessageToTeam(\"Országos Rendőr Fő-kapitányság\",\"(( Bírság: \" .. fine .. \" Ft. ))\", 0, 102, 255) toggleAllControls ( targetPlayer, true, true, true ) exports.logs:logMessage(\"[PD/ARREST] \" .. username .. \" letartoztatta \" .. targetPlayerNick .. \"-t. Ido: \" .. jailtime .. \" perc. Oka: \"..reason , 30) end end end endendendendaddCommandHandler(\"arrest\", arrestPlayer)
Na hello! egy nagy kérdésem lenne mégpedig, hol kell beállítani hogy az LSPD-system meik frakció id-t kérje le? átfutottam az összes scriptet sehol sem találom. így nem tudom használni a /berak /arrest /ticket parancsokat. lspd-system mappa > pdcommands.lua, pdcommands2.lua [/quote]na máshogy a helyzet. pdcommand.lua van, megolda |pdcommands2.lua nincs. | arrest a policejail és policejail2 ben így fest: -- /arrestfunction arrestPlayer(thePlayer, commandName, targetPlayerNick, fine, jailtime, ...)local logged = getElementData(thePlayer, \"loggedin\")if (logged==1) thenlocal theTeam = getPlayerTeam(thePlayer)local factionType = getElementData(theTeam, \"type\")local teamID = getElementData(theTeam, \"id\")if (jailtime) then jailtime = tonumber(jailtime)endlocal playerCol = isInArrestColshape(thePlayer)if (factionType==2) and playerCol then if not (targetPlayerNick) or not (fine) or not (jailtime) or not (...) or (jailtime<1) or (jailtime>9999999) then outputChatBox(\"HASZNÁLAT: /arrest [Játékos Névrészlet / ID] [bírság] [idő (Perc 1->9999999)] [Elkövetett bűn]\", thePlayer, 255, 194, 14) else local targetPlayer, targetPlayerNick = exports.global:findPlayerByPartialNick(thePlayer, targetPlayerNick) if targetPlayer then local targetCol = isInArrestColshape(targetPlayer) if not targetCol then outputChatBox(\"(( A rab nincs a letartóztatási helyen! ))\", thePlayer, 255, 0, 0) elseif targetCol ~= playerCol then outputChatBox(\"(( A rab nincs a letartóztatási helyen! ))\" , thePlayer, 255, 0, 0) else local jailTimer = getElementData(targetPlayer, \"pd.jailtimer\") local username = getPlayerName(thePlayer) local reason = table.concat({...}, \" \") if (jailTimer) then outputChatBox(\"(( A játékos már börtönben van! ))\", thePlayer, 255, 0, 0) else local finebank = false local targetPlayerhasmoney = exports.global:getMoney(targetPlayer, true) local amount = tonumber(fine) mysql:query_free(\"UPDATE characters SET money = money - \" .. amount .. \" WHERE id = \" .. getElementData( targetPlayer, \"dbid\" ) ) setPlayerMoney(targetPlayer, getPlayerMoney(targetPlayer) - amount) local theTimer = setTimer(timerPDUnjailPlayer, 60000, 1, targetPlayer) exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"pd.jailserved\", 0, false) exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"pd.jailtime\", jailtime, false) exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"pd.jailtimer\", theTimer, false) toggleControl(targetPlayer,\'next_weapon\',false) toggleControl(targetPlayer,\'previous_weapon\',false) toggleControl(targetPlayer,\'fire\',false) toggleControl(targetPlayer,\'aim_weapon\',false) local restrainedObj = getElementData(targetPlayer, \"restrainedObj\") if restrainedObj then toggleControl(targetPlayer, \"sprint\", true) toggleControl(targetPlayer, \"jump\", true) toggleControl(targetPlayer, \"accelerate\", true) toggleControl(targetPlayer, \"brake_reverse\", true) exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"restrain\", 0) exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"restrainedBy\") exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"restrainedObj\") if restrainedObj == 45 then local dbid = getElementData(targetPlayer, \"dbid\") exports[\'item-system\']:deleteAll(47, dbid) end exports.global:giveItem(thePlayer, restrainedObj, 1) mysql:query_free(\"UPDATE characters SET cuffed = 0, restrainedby = 0, restrainedobj = 0 WHERE id = \" .. mysql:escape_string(getElementData( targetPlayer, \"dbid\" )) ) end setPedWeaponSlot(targetPlayer,0) exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"pd.jailstation\", targetCol) mysql:query_free(\"UPDATE characters SET pdjail=\'1\', pdjail_time=\'\" .. mysql:escape_string(jailtime) .. \"\', pdjail_station=\'\" .. mysql:escape_string(targetCol) .. \"\', cuffed = 0, restrainedby = 0, restrainedobj = 0 WHERE id = \" .. mysql:escape_string(getElementData( targetPlayer, \"dbid\" )) ) outputChatBox(\"(( Letartóztattad \" .. targetPlayerNick .. \"-t \" .. jailtime .. \" percre. ))\", thePlayer, 255, 0, 0) setElementPosition(targetPlayer, 546.1142578125, -39.0595703125, 131.1242980957) setElementDimension(targetPlayer, 77 ) setElementInterior(targetPlayer, 11 ) setPedRotation(targetPlayer, 0) setElementFrozen(source, false) exports.global:givePlayerAchievement(thePlayer, 7) exports.global:givePlayerAchievement(targetPlayer, outputChatBox(\"(( \" .. username .. \" letartóztatott téged \" .. jailtime .. \" percre! ))\", targetPlayer, 0, 102, 255) outputChatBox(\"(( Vád(ak): \" .. reason .. \". ))\", targetPlayer, 0, 102, 255) takeAllWeapons ( targetPlayer ) SendMessageToTeam(\"Országos Rendőr Fő-kapitányság\", \"(( \" .. username .. \" letartóztatta \" .. targetPlayerNick .. \"-t! ))\", 0, 102, 255) SendMessageToTeam(\"Országos Rendőr Fő-kapitányság\",\"(( Vád(ak): \" .. reason .. \". ))\", 0, 102, 255) SendMessageToTeam(\"Országos Rendőr Fő-kapitányság\",\"(( Bírság: \" .. fine .. \" Ft. ))\", 0, 102, 255) toggleAllControls ( targetPlayer, true, true, true ) exports.logs:logMessage(\"[PD/ARREST] \" .. username .. \" letartoztatta \" .. targetPlayerNick .. \"-t. Ido: \" .. jailtime .. \" perc. Oka: \"..reason , 30) end end end endendendendaddCommandHandler(\"arrest\", arrestPlayer) Nem megy [/quote]Debugolj, nézd meg melyik része nem működik.