
Mbtdaa
Members-
Posts
262 -
Joined
-
Last visited
Everything posted by Mbtdaa
-
it's working for all users jr and the player not have band if he log
-
thx jr but it's work for any user log adman guest any .. and it's no have band
-
oK JR what function i need to do that?
-
same problem ERROR: Loading script failed: serial\cod_server.lua:2: unexpected symbol near '['
-
[2014-03-17 13:21:58] ERROR: Loading script failed: serial\cod_server.lua:2: unexpected symbol near '[' serials = { maznn= ["7C27DEB93C7DCE0FEDF877294A46C084"] mazn = ["7C27DEB93C7DCE0FEDF877294A46C084"] max = ["7C27DEB93C7DCE0FEDF877294A46C084"] khald = ["7C27DEB93C7DCE0FEDF877294A46C084"] a7md = ["7C27DEB93C7DCE0FEDF877294A46C084"] } function antiUser() for k,v in pairs (serials) do local serials = getPlayerSerial (source) if ( getAccountName(getPlayerAccount(source)) == "serials" ) then if ( serials ) then outputChatBox ( "#FF0000* #00C4FFSerial was checked it is", getRootElement(), 0, 255, 0, true ) else outputChatBox ( "** Warning ** #FFff00he is Tradition and not", getRootElement(), 255, 0, 0, true ) banPlayer( nil, nil, serials, source, "bye bye You'r not" ) end end end addEventHandler("onPlayerLogin",root,antiUser)
-
hi whats the problem with that code? serials = { maznn= ["7C27DEB93C7DCE0FEDF877294A46C084"] mazn = ["7C27DEB93C7DCE0FEDF877294A46C084"] max = ["7C27DEB93C7DCE0FEDF877294A46C084"] khald = ["7C27DEB93C7DCE0FEDF877294A46C084"] a7md = ["7C27DEB93C7DCE0FEDF877294A46C084"] } function antiUser() for k,v in pairs (serials) do local serials = getPlayerSerial (source) if ( getAccountName(getPlayerAccount(source)) == "serials" ) then if ( serials ) then outputChatBox ( "#FF0000* #00C4FFSerial was checked it is", getRootElement(), 0, 255, 0, true ) else outputChatBox ( "** Warning ** #FFff00he is Tradition and not", getRootElement(), 255, 0, 0, true ) banSerial( nil, nil, serials, source, "bye bye You'r not" ) end end end addEventHandler("onPlayerLogin",root,antiUser) maznn= ["7C27DEB93C7DCE0FEDF877294A46C084"] mazn = ["7C27DEB93C7DCE0FEDF877294A46C084"] max = ["7C27DEB93C7DCE0FEDF877294A46C084"] khald = ["7C27DEB93C7DCE0FEDF877294A46C084"] a7md = ["7C27DEB93C7DCE0FEDF877294A46C084"] users - serials [2014-03-17 13:18:28] SCRIPT ERROR: serial\cod_server.lua:2: unexpected symbol near '[' Loading script failed: serial\cod_server.lua:2: unexpected symbol near '[' '
-
GUIEditor = { gridlist = {}, window = {}, label = {}, memo = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(230, 155, 663, 440, "Teams System", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 0.90) noteam = guiCreateButton(9, 21, 97, 123, "Go To NoTeam", false, GUIEditor.window[1]) guiSetProperty(noteam, "NormalTextColour", "FFF93905") nill = guiCreateButton(9, 156, 93, 133, "nill", false, GUIEditor.window[1]) guiSetProperty(nill, "NormalTextColour", "33FAF9F9") exit = guiCreateButton(9, 300, 120, 130, "Exit ", false, GUIEditor.window[1]) guiSetProperty(exit, "NormalTextColour", "B504C41A") GUIEditor.gridlist[1] = guiCreateGridList(454, 22, 199, 408, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "Teams System", 0.9) for i = 1, 2 do guiGridListAddRow(GUIEditor.gridlist[1]) end guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "NoTeam", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "nill", false, false) GUIEditor.memo[1] = guiCreateMemo(111, 23, 319, 127, "Mod V.1.0 \nCan To Go NoTeam\nOr nill Team\n\nAnd In Gridlist Click You Team \n\n#", false, GUIEditor.window[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) GUIEditor.label[1] = guiCreateLabel(115, 167, 300, 28, "Teams System V.1.0", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-small") guiLabelSetColor(GUIEditor.label[1], 247, 75, 127) guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) end ) addEventHandler("onClientRender", root, function() dxDrawText("Team System Started v.1", 966, 699, 1083, 731, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "top", false, true, true, true, false) dxDrawText("Team System Started v.1", 965, 698, 1082, 730, tocolor(3, 54, 9, 32), 1.00, "pricedown", "left", "top", false, true, true, true, false) end) addEventHandler( "onClientGUIClick", resourceRoot, function( ) if ( source == exit ) then guiSetVisible (GUIEditor.window[1],false) end end) addEventHandler( "onClientGUIClick",function( ) if ( source == noteam ) then triggerServerEvent ( 'noteam', localPlayer ) end end) addEventHandler( "onClientGUIClick",function( ) if ( source == nill ) then triggerServerEvent ( 'nill', localPlayer ) end end) bindKey ( "F2" , "down" , function () if guiGetVisible ( GUIEditor.window[1] , true ) then guiSetVisible ( GUIEditor.window[1] , false ) showCursor ( false ) else guiSetVisible ( GUIEditor.window[1] , true ) showCursor ( true ) end end) addEvent( 'noteam', true ) addEventHandler( 'noteam', root,function() setPlayerTeam(source,nil) outputChatBox ( "You Now No Team", source) end) addEvent( 'nill', true ) addEventHandler( 'nill', root,function() setPlayerTeam(source,nil) outputChatBox ( "Nill Team Done", source) end)
-
bindKey ( "F2" , "down" , function () if guiGetVisible ( GUIEditor.window[1] , true ) then guiSetVisible ( GUIEditor.window[1] , false ) showCursor ( false ) else guiSetVisible ( GUIEditor.window[1] , true ) showCursor ( true ) end end)
-
GUIEditor = { gridlist = {}, window = {}, label = {}, memo = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(230, 155, 663, 440, "Teams System", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 0.90) noteam = guiCreateButton(9, 21, 97, 123, "Go To NoTeam", false, GUIEditor.window[1]) guiSetProperty(noteam, "NormalTextColour", "FFF93905") nill = guiCreateButton(9, 156, 93, 133, "nill", false, GUIEditor.window[1]) guiSetProperty(nill, "NormalTextColour", "33FAF9F9") exit = guiCreateButton(9, 300, 120, 130, "Exit ", false, GUIEditor.window[1]) guiSetProperty(exit, "NormalTextColour", "B504C41A") GUIEditor.gridlist[1] = guiCreateGridList(454, 22, 199, 408, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "Teams System", 0.9) for i = 1, 2 do guiGridListAddRow(GUIEditor.gridlist[1]) end guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "NoTeam", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "nill", false, false) GUIEditor.memo[1] = guiCreateMemo(111, 23, 319, 127, "Mod V.1.0 \nCan To Go NoTeam\nOr nill Team\n\nAnd In Gridlist Click You Team \n\n#", false, GUIEditor.window[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) GUIEditor.label[1] = guiCreateLabel(115, 167, 300, 28, "Teams System V.1.0", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-small") guiLabelSetColor(GUIEditor.label[1], 247, 75, 127) guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) end ) addEventHandler("onClientRender", root, function() dxDrawText("Team System Started v.1", 966, 699, 1083, 731, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "top", false, true, true, true, false) dxDrawText("Team System Started v.1", 965, 698, 1082, 730, tocolor(3, 54, 9, 32), 1.00, "pricedown", "left", "top", false, true, true, true, false) end) addEventHandler( "onClientGUIClick", resourceRoot, function( ) if ( source == exit ) then guiSetVisible (GUIEditor.window[1],false) end end) addEventHandler( "onClientGUIClick",function( ) if ( source == noteam ) then triggerServerEvent ( 'noteam', localPlayer ) end end) addEventHandler( "onClientGUIClick",function( ) if ( source == nill ) then triggerServerEvent ( 'nill', localPlayer ) end end) addEvent( 'noteam', true ) addEventHandler( 'noteam', root,function() setPlayerTeam(source,nil) outputChatBox ( "You Now No Team", source) end) addEvent( 'exit', true ) addEventHandler( 'exit', root,function() setPlayerTeam(source,nil) outputChatBox ( "Nill Team Done", source) end)
-
root?? root = getRootElement () local color = getPlayerNametagColor (source) players = {} resourceRoot = getResourceRootElement ( getThisResource () ) function onResourceStart ( resource ) for id, player in ipairs( getElementsByType ( "player" ) ) do if ( players[player] ) then createBlipAttachedTo ( player, 0, 2, players[source][1], players[source][2], players[source][3] ) else createBlipAttachedTo ( player, 0, 2, color, color, color ) end end end addEventHandler ( "onResourceStart", resourceRoot, onResourceStart ) function onPlayerSpawn ( spawnpoint ) if ( players[source] ) then createBlipAttachedTo ( source, 0, 2, players[source][1], players[source][2], players[source][3] ) else createBlipAttachedTo ( source, 0, 2, color, color, color ) end end addEventHandler ( "onPlayerSpawn", root, onPlayerSpawn ) function onPlayerQuit () destroyBlipsAttachedTo ( source ) end addEventHandler ( "onPlayerQuit", root, onPlayerQuit ) function onPlayerWasted ( totalammo, killer, killerweapon ) destroyBlipsAttachedTo ( source ) end addEventHandler ( "onPlayerWasted", root, onPlayerWasted ) function setBlipsColor ( source, commandName, r, g, b ) if ( tonumber ( b ) ) then color = { tonumber ( r ), tonumber ( g ), tonumber ( b ) } for id, player in ipairs( getElementsByType ( "player" ) ) do destroyBlipsAttachedTo ( player ) if ( players[player] ) then createBlipAttachedTo ( player, 0, 2, players[source][1], players[source][2], players[source][3] ) else createBlipAttachedTo ( player, 0, 2, color, color, color ) end end end end addCommandHandler ( "setblipscolor", setBlipsColor ) function destroyBlipsAttachedTo(player) local attached = getAttachedElements ( player ) if ( attached ) then for k,element in ipairs(attached) do if getElementType ( element ) == "blip" then destroyElement ( element ) end end end end
-
What this mission timer thing does? set a time for map ?
-
ok solid the top don't refresh . You said it was working ! Stop breaking the code and ask for help again. If you mean't auto-update, then use a setTimer to call U function every 2 secs when the "top" is visible. i I just open the top and see it i did not focus sorry #
-
ok solid the top don't refresh .
-
thx it's working but can i set a font to row ?
-
function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end WindowTOP = guiCreateWindow(328, 125, 613, 514, "", false) guiSetProperty(WindowTOP, "CaptionColour", "FF00FF00") guiSetVisible(WindowTOP, false) guiWindowSetSizable(WindowTOP, false) guiWindowSetMovable(WindowTOP, false) centerWindow ( WindowTOP ) GridListTOP = guiCreateGridList(9, 27, 594, 477, false, WindowTOP) guiGridListAddColumn(GridListTOP, "Rank", 0.2) guiGridListAddColumn(GridListTOP, "Name", 0.2) guiGridListAddColumn(GridListTOP, "Money", 0.2) guiGridListAddColumn(GridListTOP, "Kills", 0.2) guiGridListAddColumn(GridListTOP, "Deaths", 0.1) function U( ) guiGridListClear( GridListTOP ) local aRow = guiGridListAddRow( GridListTOP ) local aRoww = guiGridListAddRow( GridListTOP ) local aRowww = guiGridListAddRow( GridListTOP ) local aRowwww = guiGridListAddRow( GridListTOP ) local players = getPlayersSortByKills ( ) for i = 1, 30 do if ( players [ i ] )then guiGridListSetItemText( GridListTOP, aRow, 1, i ..'-', false, false ) guiGridListSetItemColor( GridListTOP, aRow, 1, 0, 0, 255 ) guiGridListSetItemText( GridListTOP, aRoww, 2, getPlayerName ( players [ i ].element ), false, false ) guiGridListSetItemColor( GridListTOP, aRoww, 2, 255, 255, 0 ) guiGridListSetItemText( GridListTOP, aRowww, 3, tostring( players [ i ].kills ), false, false ) guiGridListSetItemColor( GridListTOP, aRowww, 3, 255, 0, 0 ) guiGridListSetItemText( GridListTOP, aRowwww, 4, getElementData ( players [ i ].element, 'Deaths' ), false, false ) guiGridListSetItemColor( GridListTOP, aRowwww, 4, 250, 154, 255 ) end end end function getPlayersSortByKills ( ) local players = { } for index, player in ipairs ( getElementsByType ( "player" ) ) do table.insert ( players, { element = player, kills = getElementData ( player, "Kills" ) or 0, } ) end table.sort ( players, function ( a, b ) return ( tonumber ( a.kills ) or 0 ) > ( tonumber ( b.kills ) or 0 ) end ) return players end bindKey ( "F2" , "down" , function () if guiGetVisible ( WindowTOP , true ) then guiSetVisible ( WindowTOP , false ) showCursor ( false ) outputChatBox ( "Closed" , 255 , 0 , 0 , true ) else guiSetVisible ( WindowTOP , true ) showCursor ( true ) outputChatBox ( "Opened" , 0 , 255 , 0 , true ) end end ) server addEventHandler( "onPlayerLogout" ,root, function( ) local accP = getPlayerAccount( source ) if ( accP and not isGuestAccount( accP ) ) then local Deaths = tonumber( getElementData( source, "Deaths" ) ) or 0 local Kills = tonumber ( getElementData( source, "Kills" ) ) or 0 setAccountData(accP, "PlayerDeaths", Deaths ) setAccountData(accP, "PlayerKills", Kills ) end end ) addEventHandler( "onPlayerLogin", root, function( _,acc ) local DataDeaths = getAccountData(acc, "PlayerDeaths" ) local DataKills = getAccountData(acc, "PlayerKills" ) if ( DataDeaths and DataKills ) then setElementData( source, "Deaths", DataDeaths ) setElementData( source, "Kills", DataKills ) end end )
-
settings i start the missiontimer it's not working no time
-
nothing show no kills no name nothng and i dont have error in debugscript
-
same problem guiGridListAddColumn(GridListTOP, "Rank", 0.2) guiGridListAddColumn(GridListTOP, "Name", 0.2) guiGridListAddColumn(GridListTOP, "Money", 0.2) guiGridListAddColumn(GridListTOP, "Kills", 0.2) guiGridListAddColumn(GridListTOP, "Deaths", 0.2) function U( ) guiGridListClear( GridListTOP ) local players = getPlayersSortByKills ( ) for i = 1, 30 do local aRow = guiGridListAddRow( GridListTOP ) local aRoww = guiGridListAddRow( GridListTOP ) local aRowww = guiGridListAddRow( GridListTOP ) local aRowwww = guiGridListAddRow( GridListTOP ) if ( players [ i ] )then guiGridListSetItemText( GridListTOP, aRow, 1, i ..'-', false, false ) guiGridListSetItemColor( GridListTOP, aRow, 1, 0, 0, 255 ) guiGridListSetItemText( GridListTOP, aRoww, 2, getPlayerName ( players [ i ].element ), false, false ) guiGridListSetItemColor( GridListTOP, aRoww, 2, 255, 255, 0 ) guiGridListSetItemText( GridListTOP, aRowww, 3, tostring( players [ i ].kills ), false, false ) guiGridListSetItemColor( GridListTOP, aRowww, 3, 255, 0, 0 ) guiGridListSetItemText( GridListTOP, aRowwww, 4, getElementData ( players [ i ].element, 'Deaths' ), false, false ) guiGridListSetItemColor( GridListTOP, aRowwww, 4, 250, 154, 255 ) end end end function getPlayersSortByKills ( ) local players = { } for index, player in ipairs ( getElementsByType ( "player" ) ) do table.insert ( players, { element = player, kills = getElementData ( player, "Kills" ) or 0, } ) end table.sort ( players, function ( a, b ) return ( tonumber ( a.kills ) or 0 ) > ( tonumber ( b.kills ) or 0 ) end ) return players end bindKey ( "F2" , "down" , function () if guiGetVisible ( WindowTOP , true ) then guiSetVisible ( WindowTOP , false ) showCursor ( false ) outputChatBox ( "Closed" , 255 , 0 , 0 , true ) else guiSetVisible ( WindowTOP , true ) showCursor ( true ) outputChatBox ( "Opened" , 0 , 255 , 0 , true ) end end )
-
i do the map settings like that "war" type="map" name="Kabos" author="war" version="1.0.0" description="war"> "Test.map" dimension="0"> "#maxplayers" value="[ 128 ]"> "#minplayers" value="[ 0 ]"> "#gravity" value="[ 0.008000 ]" /> "#weather" value="[ 0 ]" /> "#time" value="12:0" /> "#locked_time" value="[ false ]" /> "#useLODs" value="[ false ]"> "#gamespeed" value="[ 1 ]"> "#waveheight" value="[ 0 ]" /> "#gamespeed" value="[ 1 ]" /> and mod i make meta "war" version="1.0.0" type="gamemode" description="cod2mod war"/> and it's good i start the mode i make and it's start the map and i start the misshontimer and it's not showing I did not find the time ,
-
sorry I was expedited i understand that now how can i start a custom map ? and if hey finsh moves to another map