Jump to content

Snake

Members
  • Posts

    14
  • Joined

  • Last visited

Details

  • Gang
    FSG

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Snake's Achievements

Square

Square (6/54)

0

Reputation

  1. 1. setmap function works if you press buymap.(only admin) 2. function buymap no work. Why? Pls help.
  2. Maybe need to give others rights?
  3. There is progress)) Now buy maps can only administrators. Everyone can not. I added to the Default ACL this: right> No not work(
  4. Add executeCommandHandler ( "nextmap" , thePlayer, MapName ) Server_lua. -- Buy a next map function buyMap(mapName) local account = getPlayerAccount(source) local cash = getAccountData(account, "cash") local level = getAccountData(account, "level") if not (mapName == "") then if not (isGuestAccount(getPlayerAccount(source))) then if tonumber(level) >= 10 then if tonumber(cash) >= 3500 then executeCommandHandler ( "nextmap" , thePlayer, MapName ) else outputChatBox("#FFFFFF[userpanel] #FF9900You don't have enough money to set a map!",source,255,255,255,true) end else outputChatBox("#FFFFFF[userpanel] #FF9900You need to be level #FFFFFF10 #FF9900to buy maps!",source,255,255,255,true) end end else outputChatBox("#FFFFFF[userpanel] #FF9900Please select a map from the list first!",source,255,255,255,true) end end addEvent("triggerbuyMap",true) addEventHandler( "triggerbuyMap", getRootElement(),buyMap ) function onBuyMapReady() local account = getPlayerAccount(source) addStat(account,"cash",-3500) end addEvent("setCashofBuyMap",true) addEventHandler( "setCashofBuyMap", getRootElement(), onBuyMapReady ) --end MAP Racevoting_server.lua addCommandHandler('nextmap', function( player, command, ... ) -- CADU !@ HERE local query = #{...}>0 and table.concat({...},' ') or nil if not query then if g_ForcedNextMap then outputRace( 'Next map is ' .. getMapName( g_ForcedNextMap ), player ) else outputRace( 'Next map is not set', player ) end return end if not _TESTING and not isPlayerInACLGroup(player, g_GameOptions.admingroup) then return end local map, errormsg = findMap( query ) if not map then outputRace( errormsg, player ) return end if g_ForcedNextMap == map then outputRace( 'Next map is already set to ' .. getMapName( g_ForcedNextMap ), player ) return end --NextMapBuyed = true g_ForcedNextMap = map outputChatBox('#00B2EE* #ECECECNextmap: #ABCDEF' .. getMapName( g_ForcedNextMap ) .. ' #00FF00set #ECECECby #ECECEC' .. getPlayerName( player ), g_Root, 236, 236, 236, true) triggerClientEvent ( "setNextMap", getRootElement(), getMapName( g_ForcedNextMap ) ) end ) function startingNextText() -- CADU!@ --getMapsCompatibleWithGamemode g_ForcedNextMap = getRandomMapCompatibleWithGamemode( getThisResource(), 10, g_GameOptions.ghostmode and 0 or getTotalPlayerCount() ) if g_ForcedNextMap then triggerClientEvent ( "setNextMap", getRootElement(), getMapName( g_ForcedNextMap ) ) end end addEventHandler( "onMapStarting", getRootElement(), startingNextText) buyed = {} addCommandHandler('buynextmap', function( player, command, ... ) local query = #{...}>0 and table.concat({...},' ') or nil if not query then if g_ForcedNextMap then outputRace( 'Next map is ' .. getMapName( g_ForcedNextMap ), player ) else outputRace( 'Next map is not set', player ) end return end local map, errormsg = findMap( query ) if not map then outputRace( errormsg, player ) return end if g_ForcedNextMap then outputRace ( 'Another player buy next map !', player ) return end if g_ForcedNextMap == map then outputRace( 'Next map is already set to ' .. getMapName( g_ForcedNextMap ), player ) return end g_ForcedNextMap = map outputChatBox('#00B2EE* #ECECECNextmap: #ABCDEF' .. getMapName( g_ForcedNextMap ) .. ' #00FF00bought #ECECECby #ECECEC' .. getPlayerName( player ), g_Root, 255, 255, 255, true) triggerClientEvent ( "setNextMap", getRootElement(), getMapName( g_ForcedNextMap ) ) buyed[player] = 1 end ) --onMapStarting addCommandHandler ( '~buyednextmap~', function ( player, cmd, amount ) if buyed[player] == 1 then takePlayerMoney ( player, amount ) buyed[player] = 0 end end ) Result:)
  5. Add executeCommandHandler ( "nextmap" , thePlayer, MapName ) Server_lua. -- Buy a next map function buyMap(mapName) local account = getPlayerAccount(source) local cash = getAccountData(account, "cash") local level = getAccountData(account, "level") if not (mapName == "") then if not (isGuestAccount(getPlayerAccount(source))) then if tonumber(level) >= 10 then if tonumber(cash) >= 3500 then executeCommandHandler ( "nextmap" , thePlayer, MapName ) else outputChatBox("#FFFFFF[userpanel] #FF9900You don't have enough money to set a map!",source,255,255,255,true) end else outputChatBox("#FFFFFF[userpanel] #FF9900You need to be level #FFFFFF10 #FF9900to buy maps!",source,255,255,255,true) end end else outputChatBox("#FFFFFF[userpanel] #FF9900Please select a map from the list first!",source,255,255,255,true) end end addEvent("triggerbuyMap",true) addEventHandler( "triggerbuyMap", getRootElement(),buyMap ) function onBuyMapReady() local account = getPlayerAccount(source) addStat(account,"cash",-3500) end addEvent("setCashofBuyMap",true) addEventHandler( "setCashofBuyMap", getRootElement(), onBuyMapReady ) --end MAP Racevoting_server.lua addCommandHandler('nextmap', function( player, command, ... ) -- CADU !@ HERE local query = #{...}>0 and table.concat({...},' ') or nil if not query then if g_ForcedNextMap then outputRace( 'Next map is ' .. getMapName( g_ForcedNextMap ), player ) else outputRace( 'Next map is not set', player ) end return end if not _TESTING and not isPlayerInACLGroup(player, g_GameOptions.admingroup) then return end local map, errormsg = findMap( query ) if not map then outputRace( errormsg, player ) return end if g_ForcedNextMap == map then outputRace( 'Next map is already set to ' .. getMapName( g_ForcedNextMap ), player ) return end --NextMapBuyed = true g_ForcedNextMap = map outputChatBox('#00B2EE* #ECECECNextmap: #ABCDEF' .. getMapName( g_ForcedNextMap ) .. ' #00FF00set #ECECECby #ECECEC' .. getPlayerName( player ), g_Root, 236, 236, 236, true) triggerClientEvent ( "setNextMap", getRootElement(), getMapName( g_ForcedNextMap ) ) end ) function startingNextText() -- CADU!@ --getMapsCompatibleWithGamemode g_ForcedNextMap = getRandomMapCompatibleWithGamemode( getThisResource(), 10, g_GameOptions.ghostmode and 0 or getTotalPlayerCount() ) if g_ForcedNextMap then triggerClientEvent ( "setNextMap", getRootElement(), getMapName( g_ForcedNextMap ) ) end end addEventHandler( "onMapStarting", getRootElement(), startingNextText) buyed = {} addCommandHandler('buynextmap', function( player, command, ... ) local query = #{...}>0 and table.concat({...},' ') or nil if not query then if g_ForcedNextMap then outputRace( 'Next map is ' .. getMapName( g_ForcedNextMap ), player ) else outputRace( 'Next map is not set', player ) end return end local map, errormsg = findMap( query ) if not map then outputRace( errormsg, player ) return end if g_ForcedNextMap then outputRace ( 'Another player buy next map !', player ) return end if g_ForcedNextMap == map then outputRace( 'Next map is already set to ' .. getMapName( g_ForcedNextMap ), player ) return end g_ForcedNextMap = map outputChatBox('#00B2EE* #ECECECNextmap: #ABCDEF' .. getMapName( g_ForcedNextMap ) .. ' #00FF00bought #ECECECby #ECECEC' .. getPlayerName( player ), g_Root, 255, 255, 255, true) triggerClientEvent ( "setNextMap", getRootElement(), getMapName( g_ForcedNextMap ) ) buyed[player] = 1 end ) --onMapStarting addCommandHandler ( '~buyednextmap~', function ( player, cmd, amount ) if buyed[player] == 1 then takePlayerMoney ( player, amount ) buyed[player] = 0 end end ) Result:)
  6. No work buy maps -- Buy a next map function buyMap(mapName) local account = getPlayerAccount(source) local cash = getAccountData(account, "cash") local level = getAccountData(account, "level") if not (mapName == "") then if not (isGuestAccount(getPlayerAccount(source))) then if tonumber(level) >= 10 then if tonumber(cash) >= 3500 then triggerEvent("onNextmapBuy",source,mapName) else outputChatBox("#FFFFFF[userpanel] #FF9900You don't have enough money to set a map!",source,255,255,255,true) end else outputChatBox("#FFFFFF[userpanel] #FF9900You need to be level #FFFFFF10 #FF9900to buy maps!",source,255,255,255,true) end end else outputChatBox("#FFFFFF[userpanel] #FF9900Please select a map from the list first!",source,255,255,255,true) end end addEvent("triggerbuyMap",true) addEventHandler( "triggerbuyMap", getRootElement(),buyMap ) function onBuyMapReady() local account = getPlayerAccount(source) addStat(account,"cash",-3500) end addEvent("setCashofBuyMap",true) addEventHandler( "setCashofBuyMap", getRootElement(), onBuyMapReady ) --end MAP thanks in advance
  7. Thank you very much that he wanted to help! I've already done
  8. In general in the first code does not work setmaps (next maps)
  9. For me, this is the best maps.Ochen your very best, beautiful, and there are new ideas) It is a pity that my server is not possible to get this card (((
  10. An interesting maps and a great combination of decor decoration with the structure maps cool). It is a pity that it's not on my server (
  11. An excellent map. It is a pity that it's not on my server (
×
×
  • Create New...