megaz Posted June 18, 2015 Report Share Posted June 18, 2015 Hi Guys, Thanks auzgamer the the script as supplied works ok no errors but Message is hidden behind my Debug and was reading this post : SchwEde and changed the message so it appears on the lower portion on the screen : like this, _msg = 1001 cutText ["Thank you for playing on Epoch Survivors, Your Loyalty has been rewarded","PLAIN DOWN",2]; But it is throwing up undefind error : Error in expression <as been rewarded","PLAIN DOWN",2]; hint _msg; multiPlyWith = multiPlyWith + 1; _> Error position: <_msg; multiPlyWith = multiPlyWith + 1; _> Error Undefined variable in expression: _msg File mpmissions\__CUR_MP.Napf\Custom\fn_rewardLoyalty.sqf, line 11 I added - private [ "_msg"]; to top of script but does not alter the error - Can some one help ? Thanks MegaZ Link to comment Share on other sites More sharing options...
SchwEde Posted June 18, 2015 Report Share Posted June 18, 2015 multiPlyWith = 1; _i=0; while {_i < 7} do { if ( _i == 1) then { _reward = (10000 * multiPlyWith); player setVariable ["cashMoney", ((player getVariable ["cashMoney", 0]) + _reward), true]; cutText [format["Thank you for playing on Epoch Survivors, Your Loyalty has been rewarded"], "PLAIN DOWN"]; multiPlyWith = multiPlyWith + 1; _i = 0; }; sleep 1800; _i = _i + 1; }; megaz and Zoranth 2 Link to comment Share on other sites More sharing options...
megaz Posted June 19, 2015 Report Share Posted June 19, 2015 Thanks SchwEde, fixed the error MegaZ SchwEde 1 Link to comment Share on other sites More sharing options...
Brian Soanes Posted June 19, 2015 Report Share Posted June 19, 2015 sleep 1800; If you were a coder you would know how bad that sleep is :P Link to comment Share on other sites More sharing options...
SchwEde Posted June 19, 2015 Report Share Posted June 19, 2015 I just edited the original code with the message. I did not ask permission nor I want to edit the code from its original author. Also I'm pretty aware of it, but how about giving a beer solution for that instead of simply telling that this is a bad idea;P PS never called myself a coder either :P Link to comment Share on other sites More sharing options...
megaz Posted June 19, 2015 Report Share Posted June 19, 2015 Hi Guys just been informed by player that ever time they die and respawn they are get a new set of Coins? This is the code in use: multiPlyWith = 1; _i=0; while {_i < 7} do { if ( _i == 1) then { _reward = (10000 * multiPlyWith); player setVariable ["cashMoney", ((player getVariable ["cashMoney", 0]) + _reward), true]; cutText [format["Thank you for playing on Epoch Survivors, Your Loyalty has been rewarded"], "PLAIN DOWN"]; multiPlyWith = multiPlyWith + 1; _i = 0; }; sleep 6000; _i = _i + 1; }; So it will only give player coins after 1hr 40mins ie once per server restart as I have it set as 3 hours any idea why? MegaZ Link to comment Share on other sites More sharing options...
Brian Soanes Posted June 19, 2015 Report Share Posted June 19, 2015 I just edited the original code with the message. I did not ask permission nor I want to edit the code from its original author. Also I'm pretty aware of it, but how about giving a beer solution for that instead of simply telling that this is a bad idea;P PS never called myself a coder either :P Take a look at the quoted post below Hi Guys just been informed by player that ever time they die and respawn they are get a new set of Coins? This is the code in use: code etc sleep 6000; MegaZ SchwEde 1 Link to comment Share on other sites More sharing options...
SchwEde Posted June 19, 2015 Report Share Posted June 19, 2015 Nice One :D Well still no interest to fix code from other authors, at least not now :) Link to comment Share on other sites More sharing options...
megaz Posted June 19, 2015 Report Share Posted June 19, 2015 So I take it long sleep is bad ? I am not a coder so don't know how to fix, Could Original poster fix or any one help with this ? Thanks MegaZ Link to comment Share on other sites More sharing options...
auzgamer Posted June 19, 2015 Author Report Share Posted June 19, 2015 Set the sleep based on your servers restart and how often you want it to reward players I will look at updating it after I'm finished looking into the bounty system SchwEde 1 Link to comment Share on other sites More sharing options...
hamthejam Posted June 25, 2015 Report Share Posted June 25, 2015 really cool, thanks for this! Link to comment Share on other sites More sharing options...
Brian Soanes Posted June 25, 2015 Report Share Posted June 25, 2015 It would be better to call it at server time intervals than sleeping the script Link to comment Share on other sites More sharing options...
megaz Posted June 26, 2015 Report Share Posted June 26, 2015 It would be better to call it at server time intervals than sleeping the script How would this been done ? Care to share :) Link to comment Share on other sites More sharing options...
JohnnyBravo666 Posted July 5, 2015 Report Share Posted July 5, 2015 Any chance to show the reward message longer than 2 secs? the message appears only for about 2 sec and no one can read it. I changed how it displayed the message as it was hiding behind my debug monitor. It now displays in center of the screen for a decent amount of time for all my players to read it. titleText [format ["Loyalty Time Reward! === %1 Thank You for playing on Outsiders Gaming! Your loyalty has been rewarded with: $%2", name player, _reward], "PLAIN DOWN"]; The line above is directly from the file. Zoranth 1 Link to comment Share on other sites More sharing options...
megaz Posted July 5, 2015 Report Share Posted July 5, 2015 I changed how it displayed the message as it was hiding behind my debug monitor. It now displays in center of the screen for a decent amount of time for all my players to read it. titleText [format ["Loyalty Time Reward! === %1 Thank You for playing on Outsiders Gaming! Your loyalty has been rewarded with: $%2", name player, _reward], "PLAIN DOWN"]; The line above is directly from the file. Do you not have the problem with when the time is up and people get the money, and if they die and respawn they get the reward again - and can keep doing this till server reset Link to comment Share on other sites More sharing options...
JohnnyBravo666 Posted July 15, 2015 Report Share Posted July 15, 2015 Do you not have the problem with when the time is up and people get the money, and if they die and respawn they get the reward again - and can keep doing this till server reset I have it set so the players will receive the reward every 30 minutes at the moment. I am trying to figure out how to implement into the code how to void it if they are just sitting in trader zones or at their base. When they die, the timer is reset on their character so they once they log back in, they have to wait another 30 minutes. Link to comment Share on other sites More sharing options...
megaz Posted July 24, 2015 Report Share Posted July 24, 2015 I have it set so the players will receive the reward every 30 minutes at the moment. I am trying to figure out how to implement into the code how to void it if they are just sitting in trader zones or at their base. When they die, the timer is reset on their character so they once they log back in, they have to wait another 30 minutes. Hi Johnny, Could you post up you alterations as I had to remove it, As my players were killing themselves and getting back to the corpse to get the money time and time again. Thanks MegaZ Link to comment Share on other sites More sharing options...
getwastedgaming1 Posted August 18, 2015 Report Share Posted August 18, 2015 Works great & simple to implement. We called ours Centerlink payments :P Link to comment Share on other sites More sharing options...
Bricktop Posted September 10, 2015 Report Share Posted September 10, 2015 (edited) One question..How do I make the message stay on the screen longer? ================Thanks, Bricktop Edited September 10, 2015 by Bricktop Link to comment Share on other sites More sharing options...
ghosted2014 Posted October 27, 2015 Report Share Posted October 27, 2015 not giving out money after 30 mins need help please Link to comment Share on other sites More sharing options...
Donnovan Posted October 27, 2015 Report Share Posted October 27, 2015 Awesome idea!I liked it very much!May be make the reward for starter/poor players better than to old/rich players. I will try to do that.Thankyou for sharing!PS: some people sayd me that is better to use uiSleep instead of sleep. May be it worth the change. Link to comment Share on other sites More sharing options...
JohnnyBravo666 Posted December 23, 2015 Report Share Posted December 23, 2015 On 7/24/2015 at 4:45 PM, megaz said: I have it set so the players will receive the reward every 30 minutes at the moment. I am trying to figure out how to implement into the code how to void it if they are just sitting in trader zones or at their base. When they die, the timer is reset on their character so they once they log back in, they have to wait another 30 minutes. Hi Johnny, Could you post up you alterations as I had to remove it, As my players were killing themselves and getting back to the corpse to get the money time and time again. Thanks MegaZ Sorry MegaZ, I wasn't receiving any notifications for this thread. Just saw your message now. My players are receiving the reward every 30 minutes, but they have to be alive for the full 30 minutes in order to receive it. The only thing I edited in this code was the way the messages were displayed and the amounts the players receive. Right now, for the first 30 minutes that they are alive on the server, they will receive $10k. If they manage to stay alive on the server until the next 30 minutes (so the hour mark), they will received $20k. And this continuously adds $10k more each time they hit the next 30 minute mark, as long as they stay alive consecutively. So really, it would benefit them more if they stayed alive instead of dying as all they're doing is resetting the timer. Do you still need the code ? Link to comment Share on other sites More sharing options...
megaz Posted December 23, 2015 Report Share Posted December 23, 2015 Hi Johnny if you dont mind - I would like to put it back in, but cant as it is. As my player just kill them selves over and over. Tahnks MegaZ Link to comment Share on other sites More sharing options...
JohnnyBravo666 Posted January 1, 2016 Report Share Posted January 1, 2016 On 12/23/2015 at 4:12 AM, megaz said: Hi Johnny if you dont mind - I would like to put it back in, but cant as it is. As my player just kill them selves over and over. Tahnks MegaZ Sorry for the late reply MegaZ. This is what I am using for the loyalty rewards. They are released to players every 30 minutes. At the 30 minute timer from when they log in, they will receive $10k, if they stay alive and logged in and make it to the 60 minute timer, they will receive $20k, 90 minutes = $30k, and so on. It goes up in $10k interverals When a player dies or relogs, the timer is automatically reset and the first reward they would receive when they hit the next 30 minute mark is $10k again. So really, the smart thing to do is to keep the player alive. In the near future, I am going to add where the player has to be moving and not in a safezone or near plot pole in order to receive this too. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// multiPlyWith = 1; _i=0; while {_i < 7} do { if ( _i == 1) then { _reward = (10000 * multiPlyWith); player setVariable ["cashMoney", ((player getVariable ["cashMoney", 0]) + _reward), true]; titleText [format ["Loyalty Time Reward! === %1 Thank You for playing on Outsiders Gaming! Your loyalty has been rewarded with: $%2", name player, _reward], "PLAIN DOWN"]; multiPlyWith = multiPlyWith + 1; _i = 0; }; sleep 1800; _i = _i + 1; }; ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Link to comment Share on other sites More sharing options...
OmigaaaD Posted January 12, 2016 Report Share Posted January 12, 2016 So i made some quick modifications to the script to check for safezones but i have not tried it yet, we're using Andre's Safezones multiPlyWith = 1; _i=0; while {_i < 7} do { if ( _i == 1) then { if (inSafeZone = true) exitWith { _msg2 = parseText format ["<t align='center' color='#FFFFFF' shadow='2' size='1.75'>Loyalty time reward!</t><br/><t align='center' color='#17FF41'>------------------------------</t><br/><t align='center' color='#FFFFFF'>%1 thank you for playing on THGz! You are in a Safezone! No reward this time!</t><t align='center' color='#40FF00'>$%2</t>"]; hint _msg2; } else { _reward = (5000 * multiPlyWith); player setVariable ["cashMoney", ((player getVariable ["cashMoney", 0]) + _reward), true]; _msg = parseText format ["<t align='center' color='#FFFFFF' shadow='2' size='1.75'>Loyalty time reward!</t><br/><t align='center' color='#17FF41'>------------------------------</t><br/><t align='center' color='#FFFFFF'>%1 thank you for playing on THGz! Your loyalty has been rewarded with: </t><t align='center' color='#40FF00'>$%2</t>", name player, _reward]; hint _msg; multiPlyWith = multiPlyWith + 1; _i = 0; }; }; sleep 1800; _i = _i + 1; }; Edit: Does not work, gonna redo it when im not as tired :P Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now