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 (6/54)
0
Reputation
-
1. setmap function works if you press buymap.(only admin) 2. function buymap no work. Why? Pls help.
-
Maybe need to give others rights?
-
There is progress)) Now buy maps can only administrators. Everyone can not. I added to the Default ACL this: right> No not work(
-
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:)
-
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:)
-
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
-
Thank you very much that he wanted to help! I've already done
-
In general in the first code does not work setmaps (next maps)
-
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 (((
-
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 (
-
An excellent map. It is a pity that it's not on my server (