Jump to content

Blueman

Members
  • Content Count

    110
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Blueman

  • Rank
    Sucka
  • Birthday March 29

Details

  • Interests
    C++,C,Lua,Java,ActionScript,Assembly and just about any other programing language/topic

Recent Profile Visitors

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

  1. I never called setElementMoney in my code.. I called setPlayerMoney because when I called givePlayerMoney(source, 1000) it would do nothing... Cleaned up the code and added some comments. This is a bit different than the original since i've been working on it but it does not seem to be destroy the map blip local hasBeenCollected=true local theDrug local locx,locy,locz,hint={-2923.1591, -1126.8721}, {1165.1446, 834.1354}, {13.5312, 3.0777}, {"The back yards of san fiero", "A ocea
  2. My issue is using givePlayerMoney just does nothing with no errors and no feedback at all. LaCosta's suggestion worked fine though.
  3. It seems the givePlayerMoney is not behaving as it should in this case. I get output into the chatbox but I receive no money. local hasBeenCollected local theDrug local locx,locy,locz={-2923.1591},{1165.1446},{13.5312} function pickedUpDrug(pickup,dimension) if(getElementData(theDrug, "rpg.drug") == "a") then local dbgmny = setPlayerMoney(source, 20000) if(dbgmny == false) then outputChatBox("Error money", getRootElement(), 0, 0, 255, true) end outputChatBox ( getPlayerName(source).." has collected the drug package", getRootElement(), 0, 0, 255, true )
  4. If this is your gamemode you must use spawnPlayer() in order to spawn the players at start. local X= local Y= local Z= --Write your spawn coordinates after the X, Y and Z function PLJOIN() spawnPlayer(source, X, Y, Z) fadeCamera(source, true) setCameraTarget(source, source) end addEventHandler("onPlayerJoin", getRootElement(), PLJOIN) --Change this to "onPlayerLogin" if you want players to spawn at login
  5. Blueman

    XML help

    Thanks I am not looking to do much I am just scripting for fun and the problem is it wouldn't save to the xml file but I will see if yours works. Also the script was just a test script thanks. Note: I was pretty tired when I wrote this so the debug string thing was probably due to that. :3
  6. Blueman

    XML help

    It seems when I execute this code it doesn't save to the xml file like it is intended to. Ranks.xml <Ranks> <gameranks> </gameranks> </Ranks> Meta.xml <meta> <info name="RankSystem" author="Blueman" version="1.0.0" type="script"></info> <script src="Main.lua" type="server"/> <file src="Ranks.xml" /> </meta> Ranks = xmlLoadFile ( "Ranks.xml" ) function createRank(INT, Label) if (INT) and (Label) then local GR = xmlFindChild(Ranks,"gameranks",0) if (xmlFindChild(GR, INT)) th
  7. 24.11.225.9 You are fast to respond
  8. It seems that no one accept me is able to connect to my server. My ports are forwarded properly I made sure the firewall was set up right and yet no one can connect. I have no problem with my other servers such as my http and MC server. Also a little thing to note is that it is unable to connect to game-monitor.com it says it is unavailable.
  9. Thanks for the help.
  10. Where would it be best to ask about problems with my server I can't seem to remember where.
  11. One problem you set the amount of times to repeat to 0 causing an infinite loop. local PingTable = { } local default_time = 10000 addEventHandler( 'onPlayerJoin', root, function( ) PingTable [ source ] = setTimer( function( player ) if getPlayerPing( player ) > tonumber( get( 'MaxPing' ) ) then kickPlayer( player, "High Ping" ) else outputDebugString( '*'..getPlayerName( player ).. ' Has passed the ping check' ) end end, tonumber( get( "D
  12. Blueman

    Goto statement

    It is still polite to make sure he knows. :3
  13. Well the console keeps claiming that this is a string then I make some changes to convert it from a string to a int and it says it is a Boolean. Ping.lua PingTable = { } function PingCheck(source) if (getPlayerPing(sourcer) > get("MaxPing")) then kickPlayer(ThePlayer, "High Ping") else outputConsle( ThePlayer.. "Has passed the ping check") end end function onPlayerJoinGame() table.insert(PingTable ,setTimer(PingCheck, tonumber(get("Delay")), 1 , source) ) end addEventHandler("onPlayerJoin", getRootElement(), onPlayerJoinGame) Meta.xml <Meta&
  14. Blueman

    Goto statement

    You can just put a script in a function and execute that function when needed like so. function excutor() --A bunch of code here. CODE() --A bunch of code here. end function CODE() --Your code to be executed here. end
×
×
  • Create New...