Jump to content
Sign in to follow this  
Speedy

[Release] Server advertising script.

Recommended Posts

Hello! Today I wanna share my script with you that allows you to better advertise your server.

The script works in such a way that if a player on your server has a specific phrase in their nick on the steam for an example your server name/servers website they will get an additional paycheck to their bank account.

 

Author: Speedy

Difficulty: Easy Peasy Lemon Squeezy

Tutorial:

 

1. Create a file called "steamnamepaycheck.sqf" in your missions root directory

2. Copy this and paste it to the file "steamnamepaycheck.sqf" and save the file

Spoiler

/*
    File: steamnamepaycheck.sqf
    Author: Speedy

    Description: The script works in such a way that if a player on your server has a specific phrase in their nick on the steam for an example your servers name/servers website they will get an additional paycheck to their bank account.

    Hint: Change (yourservername) to yours servers webiste or name.

*/

_nazwasteam = profileNameSteam;
_tab = _nazwasteam splitstring " ";
while { true }
do {
    if ("yourservername" IN _tab) then {
            life_atmbank = life_atmbank + 10000;
            systemChat "You just got 10k for having (yourservername) in your steam nickname!";
            sleep 900; // Here you change the time of giving the paycheck. 900 sec = 15 minutes
        } 
else {
            systemchat "Add (yourservername) in your steam nickname to get your free 10k!";
            sleep 900; // Here you change the time of giving the paycheck. 900 sec = 15 minutes
        }
};

3. Go to initPlayerLocal.sqf file and add

[] execVM "steamnamepaycheck.sqf";

under

[] execVM "core\init.sqf";

 

 

If you have any questions or problems please ask me in the comment section. Don't quote the whole thread, just tag me with @Speedy

Thank you.

Edited by Speedy
  • Thanks 1

Share this post


Link to post
Share on other sites
22 hours ago, AnonOp said:

not working ... if people have servername in profil ... @Speedy

I wouldn't recommend using this method anyway, an additional loop is not required.

Instead add this to your client.fsm

	private _sName = "servername";
	private _amount = 10000;

	if ([_sName, profileNameSteam, false] call BIS_fnc_inString) then {
		life_atmbank = life_atmbank + _amount;
		systemChat format["You also received $%1 for having %2 in your name!",[_amount] call life_fnc_numberText, _sName];
	} else {
		systemChat format["You could have received an additional $%1 for having %2 in your name!",[_amount] call life_fnc_numberText, _sName];
	};

Should look like this after:

83b52f285abb45204012f229b0027ff1.png

  • Like 2

Share this post


Link to post
Share on other sites
On 7/25/2020 at 9:26 PM, AnonOp said:

not working ... if people have servername in profil ... @Speedy

Just for sure. Do you have it on your steam profile? If you can, please paste your edited script on pastebin and give me a link to it. It works for me and I use it on my server.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.