Jump to content

deltamta

Members
  • Posts

    31
  • Joined

  • Last visited

Everything posted by deltamta

  1. addCommandHandler ( "bm", function( thePlayer, command, ... ) local mapName = #{...}>0 and table.concat({...},' ') or nil if mapbought == false then local cash = tonumber( getElementData( thePlayer, "Cash" ) ) if cash >= mapcost then buymap = executeCommandHandler("asdasdfavaginabomb", thePlayer, mapName ) if ( buymap ) then setElementData ( thePlayer, "Cash", cash-mapcost ) mapbought = thePlayer end else outputChatBox("#ff8900[iNFO] #ffffffYou don't have enough money to set a map.", thePlayer, 255, 255, 255, true ) end else outputChatBox("#ff8900[iNFO] #ffffffA map has been already set. Please try again later.", thePlayer, 255, 255, 255,true ) end end ) addCommandHandler ( "ubm", function ( thePlayer ) if mapbought ~= false then if mapbought == thePlayer then unbuy = executeCommandHandler( "asdasdfavaginabomb", thePlayer, nil ) if ( unbuy ) then local cash = tonumber( getElementData( thePlayer, "Cash" ) ) outputChatBox("#ff8900[iNFO] #ffffff"..getPlayerName( thePlayer ).. " #ffffffhas unbought next map",getRootElement(),255,255,255,true) mapbought = false setElementData ( thePlayer, "Cash", cash+mapcost ) end end end end ) This is the stats system part and bellow is the racevoting_server.lua or whatever part : addCommandHandler('asdasdfavaginabomb', 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 == map then outputRace( 'Next map is already set to ' .. getMapName( g_ForcedNextMap ), player ) return end g_ForcedNextMap = map outputChatBox( "#ff8900[iNFO] #ffffff"..getPlayerName( player ).." #ffffffhas bought next map.", getRootElement(), 255, 255, 255, true) outputChatBox( "#ff8900[iNFO] #ffffffNext map : #ff8900 "..getMapName( g_ForcedNextMap ), getRootElement(), 255, 255, 255, true ) end )
  2. As I said the bm command works so I dont see why the ubm command should not work. I just wanna destroy the map bought so that the next map is random... Hmm let me create a function that gets a random map.
  3. Update : I found it! it's sha1 hash salt but I dont see how could I encrypt the written password so when the player types the password it will convert it into sha1 hash salt so it can match with the password of the forum.
  4. Hey there, I have another query for today I was scripting today a login panel that takes the accounts from a MySQL database so you can login with your forum account. My forum software is SMF but I check the MySQL database and I see that the password is hashed. ( of course ) I was wondering what hash SMF passwords are using and how could I use the same hash in lua! Its probably MD5 combined with something else but im not sure what. Thanks again, *Delta^#
  5. hey I dont see you helping me by saying hi :3
  6. Hello there, I'm making a MySQL stats system that you can buy / unbuy maps from. I already made the buying maps function and it works : ( executeCommandHandler("nextmapcommand", thePlayer, MapName ) ) and i wanna make the unbuying map and im not so sure how I could do that... i tried many things but they dont seem to work : ex. ( unbuy = executeCommandHandler( "nextmapcommand", thePlayer, nil ) ) Doesn't work though... Still keeps the same map as next map. Could you please tell me how could I make it unbuy the map that was bought? That would be great if you could Thanks in advance. *Delta^#
×
×
  • Create New...