PaiN^
Members-
Posts
2,258 -
Joined
-
Last visited
Everything posted by PaiN^
-
القسم غلط + نزل مشكلتك في موضوع ديلوكس https://forum.multitheftauto.com/viewtopic.php?f=165&t=50288
-
( C, C#, C++ ) Cأعتقد وحدة من لغات الـ
-
3ssol = createObject( ... ) function move( ) local x, y, z = getElementPosition( 3ssol ) moveObject( 3ssol, 1000, x + 2, y, z ) return true end addEventHandler( "onResourceStart", resourceRoot, function( ) for k,v in ipairs( getElementsByType( "player" ) ) do bindKey( v, "arrow_l", "down", move ) end end )
-
The team name is "Criminal" not "Criminals" ! + You're missing and "end" function createCriminalTeam( ) Criminalteam = createTeam( "Criminal", 255, 0, 0 ) end addEventHandler( "onResourceStart", resourceRoot, createCriminalTeam ) addEvent( "enterCriminalJob", true ) function setPlayerCriminal( thePlayer ) if getElementType( thePlayer ) == "player" then local playerID = exports.server:playerID( thePlayer ) local oldTeam = getPlayerTeam( thePlayer ) local playerData = exports.DENmysql:querySingle( "SELECT * FROM accounts WHERE id=? LIMIT 1", playerID ) if ( playerData ) then setElementData( thePlayer, "Occupation", "Criminal", true ) setPlayerTeam( thePlayer, getTeamFromName( "Criminal") ) setElementModel( thePlayer, tonumber( playerData.skin ) ) if ( tonumber( playerData.skin ) == 0 ) then local CJCLOTTable = fromJSON( tostring( playerData.cjskin ) ) if CJCLOTTable then for theType, index in pairs( CJCLOTTable ) do local texture, model = getClothesByTypeIndex( theType, index ) addPedClothes( thePlayer, texture, model, theType ) end end end if ( getTeamName( oldTeam ) ~= "Criminal" ) then triggerEvent( "onPlayerTeamChange", thePlayer, oldTeam, getTeamFromName( "Criminal" ) ) end triggerEvent( "onPlayerJobChange", thePlayer, "Criminal", getTeamFromName( "Criminal" ) ) exports.CPTvehicles:reloadFreeVehicleMarkers( thePlayer, true ) exports.CPThelp:createNewHelpMessageForPlayer( thePlayer, "You are now a criminal!", 200, 0, 0 ) return true else return false end end end addEventHandler( "enterCriminalJob", root, setPlayerCriminal ) function givePlayerCJClothes( thePlayer ) local playerID = exports.server:playerID( thePlayer ) local playerData = exports.DENmysql:querySingle( "SELECT * FROM accounts WHERE id=? LIMIT 1", playerID ) if ( playerData ) then setElementModel( thePlayer, 0 ) local CJCLOTTable = fromJSON( tostring( playerData.cjskin ) ) if CJCLOTTable then for theType, index in pairs( CJCLOTTable ) do local texture, model = getClothesByTypeIndex( theType, index ) addPedClothes( thePlayer, texture, model, theType ) end end return true else return false end end
-
You need a team element at setPlayerTeam, Use getTeamFromName .
-
and please use [lua][ /lua] tag while posting lua codes
-
getElementPosition لوول كلام سوجن صح راح يحتاج
-
! غير مجرب -- # Client Side GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(202,125,624,564,"Show gta3.img Files",false) guiSetAlpha(GUIEditor_Window[1],1) guiWindowSetSizable(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[1], false) GUIEditor_Grid[1] = guiCreateGridList(9,20,606,493,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) c1 = guiGridListAddColumn(GUIEditor_Grid[1],"Name",0.2) c = guiGridListAddColumn(GUIEditor_Grid[1],"the Info",0.9) GUIEditor_Button[1] = guiCreateButton(18,526,237,29,"Copy",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(413,519,202,36,"close Window",false,GUIEditor_Window[1]) function showWindow( ) guiSetVisible( GUIEditor_Window[1], not guiGetVisible( GUIEditor_Window[1] ) ) showCursor( guiGetVisible( GUIEditor_Window[1] ) ) end bindKey("F6","down",showWindow) addEvent("addInfo", true) addEventHandler("addInfo", root, function( line, theName ) local row = guiGridListAddRow( GUIEditor_Grid[1] ) guiGridListSetItemText ( GUIEditor_Grid[1], row, c1, theName, false, false ) guiGridListSetItemText ( GUIEditor_Grid[1], row, c, line, false, false ) end ) addEventHandler("onClientGUIClick", root, function() if (source == GUIEditor_Button[2]) then guiSetVisible(GUIEditor_Window[1], false) showCursor( false ) elseif (source == GUIEditor_Button[1]) then local r = guiGridListGetSelectedItem ( GUIEditor_Grid[1] ) if r and r ~= -1 then local theCopy = guiGridListGetItemText ( GUIEditor_Grid[1], r, c ) setClipboard( theCopy ) outputChatBox("Information has been copied", 255, 255, 0, false) else outputChatBox("Please select that you want to copy", 255, 0, 0, false) end end end ) -- # Server Side function handleOnPlayerModInfo(filename, modList) local theName = getPlayerName(source):gsub("#%x%x%x%x%x%x","") for idx, mod in ipairs(modList) do local line = tostring(idx)..") "..tostring(mod.name) triggerClientEvent(root, "addInfo", root, line, theName) end end addEventHandler("onPlayerModInfo", root, handleOnPlayerModInfo)
-
.gif was his second opinion, read all his post :
-
@ Mr.Pres[T]ege : بقيمته + واحد أو واحد number عناد عرف المتغير في أول مرة راح تعتبر قيمته 1, أما بعد كذا تعتبر قيمته + 1 nil يعني لو كان
-
@ ][sojn][ : getElementPosition ما يحتاج @ xXDawiXx : و ليش التايمر ؟
-
وليه كل ذا التعقيد setTeamFriendlyFire( getTeamFromName( "Army" ), false ) ! Army إذا ما ضبط فما عندك تيم إسمه
-
https://forum.multitheftauto.com/viewtopic.php?f=148&t=40809 https://forum.multitheftauto.com/viewtopic.php?f=91&t=39678
-
You mean triggerServerEvent ? I didn't understand what you said !
-
If you can do somehing server side or client side, Allways do it server side !
-
setTimer or "onClientRender" guiSetPosition
-
remove the "local" at the first line P.S. : Why are you reseting the timer while you can just make it infinite ?
-
showCursor( true )
-
مو شرط ملف مضغوط عادي لو مجلد
-
هنا منتدى تعليم ما نعطي لا اكواد ولا مودات نساعدك انت تسوي عشان تتعلم وانا عطيتك الوظايف اللي تحتاجها, حاول وبنساعدك ان شاء الله
