Moin Leute!
Heute gebe ich euch mein Paycheck System.
Ihr könnt hiermit Sachen in eurem Steam Namen abfragen und bekommt damit doppelt so viel Einkommen und eure Fraktionen haben noch einen Bonus der Pro Level geht sowohl auch der Multiplikator pro Level.
Ich untersage die Verbreitung dieser Daten und die des von mir verfassten Tutorials in anderen Foren ohne vorher mein Einverständnis dazu einzuholen.
erstellt eine Neue Datei Namens fn_steamName,sqf
Spoiler anzeigen
ersetzt eure Client.fsm mit folgendem Inhalt. (core/fsm/Client.fsm)
Spoiler anzeigen
Code
/*%FSM<COMPILE "scriptedFSM.cfg, Life Client FSM">*/
/*%FSM<HEAD>*/
/*
item0[] = {"Main_Init",0,250,-40.348839,-141.279068,49.651161,-91.279068,0.000000,"Main Init"};
item1[] = {"true",8,218,-39.994308,-65.712906,50.005692,-15.712896,0.000000,"true"};
item2[] = {"Split",2,250,-39.994308,10.874098,50.005707,60.874100,0.000000,"Split"};
item3[] = {"Time_to_pay_",4,4314,-169.516037,11.566972,-79.516006,61.567024,0.000000,"Time to pay?"};
link0[] = {0,1};
link1[] = {1,2};
link2[] = {2,3};
link3[] = {3,2};
globals[] = {0.000000,0,0,0,0,640,480,1,26,6316128,1,-456.200378,358.065338,379.837494,-151.171021,1032,646,1};
window[] = {0,-1,-1,-32000,-32000,870,52,1492,52,1,1050};
*//*%FSM</HEAD>*/
class FSM
{
fsmName = "Life Client FSM";
class States
{
/*%FSM<STATE "Main_Init">*/
class Main_Init
{
name = "Main_Init";
itemno = 0;
init = /*%FSM<STATEINIT""">*/"private [""_lastcheck"",""_food"",""_water"",""_lastsync""];" \n
"_lastcheck = time;" \n
"_food = time;" \n
"_water = time;" \n
"_lastsync = time;"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "true">*/
class true
{
itemno = 1;
priority = 0.000000;
to="Split";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "Split">*/
class Split
{
name = "Split";
itemno = 2;
init = /*%FSM<STATEINIT""">*/"systemChat format [localize ""STR_FSM_Paycheck"",(getNumber(missionConfigFile >> ""Life_Settings"" >> ""paycheck_period""))];"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "Time_to_pay_">*/
class Time_to_pay_
{
itemno = 3;
priority = 0.000000;
to="Split";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(time - _lastcheck) > ((getNumber(missionConfigFile >> ""Life_Settings"" >> ""paycheck_period"")) * 60)"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"/*" \n
" author: Risk" \n
" description: Adds Steamname check, Bonus Money & Multiplikator" \n
" returns: nothing" \n
"*/" \n
"" \n
"if (!alive player) then {" \n
" systemChat localize ""STR_FSM_MissedPay"";" \n
"} else {" \n
" if(playerSide in [west,independent,east])then{" \n
" private ""_bonus"";" \n
" private ""_multiplikator"";" \n
" if (playerSide isEqualTo west)then{" \n
" //private _payCheckConfig = missionConfigFile >> ""Life_Settings"" >> ""payCheck_Config_cop"" >> format[""level_%1_cop"", call life_coplevel];" \n
" _bonus = getNumber (missionConfigFile >> ""Life_Settings"" >> ""payCheck_Config_cop"" >> format[""level_%1_cop"", call life_coplevel] >> ""bonus"");" \n
" _multiplikator = getNumber (missionConfigFile >> ""Life_Settings"" >> ""payCheck_Config_cop"" >> format[""level_%1_cop"", call life_coplevel] >> ""multiplikator"");" \n
" };" \n
" if (playerSide isEqualTo independent)then{" \n
" //private _payCheckConfig = missionConfigFile >> ""Life_Settings"" >> ""payCheck_Config_medic"" >> format[""level_%1_medic"", call life_mediclevel];" \n
" _bonus = getNumber (missionConfigFile >> ""Life_Settings"" >> ""payCheck_Config_medic"" >> format[""level_%1_medic"", call life_mediclevel] >> ""bonus"");" \n
" _multiplikator = getNumber (missionConfigFile >> ""Life_Settings"" >> ""payCheck_Config_medic"" >> format[""level_%1_medic"", call life_mediclevel] >> ""multiplikator"");" \n
" };" \n
" if (playerSide isEqualTo east)then{" \n
" //private _payCheckConfig = missionConfigFile >> ""Life_Settings"" >> ""payCheck_Config_adac"" >> format[""level_%1_adac"", call life_adaclevel];" \n
" _bonus = getNumber (missionConfigFile >> ""Life_Settings"" >> ""payCheck_Config_adac"" >> format[""level_%1_adac"", call life_adaclevel] >> ""bonus"");" \n
" _multiplikator = getNumber (missionConfigFile >> ""Life_Settings"" >> ""payCheck_Config_adac"" >> format[""level_%1_adac"", call life_adaclevel] >> ""multiplikator"");" \n
" };" \n
" //Cop,Medic,ADAC" \n
" if (call life_fnc_steamName) then{" \n
" hint ""Da du unsere Homepage in unserem Namen stehen hast, bekommst du doppelt so viel Einkommen!"";" \n
" private _paycheck = (call life_paycheck) * _multiplikator;" \n
" life_atmbank = life_atmbank + _paycheck + _bonus;" \n
" systemChat format [""Du hast ein Einkommen in h�he von %1 bekommen und einen Bonus vom Staat in h�he von %2."",[_paycheck] call life_fnc_numberText, [_bonus] call life_fnc_numberText];" \n
" }else{" \n
" hint parseText format[""Wenn du <t font='RobotoCondensedBold'>thelastgamer.de</t> in deinen Steam Namen machst, dann bekommst du doppelt so viel einkommen!""];" \n
" life_atmbank = life_atmbank + (call life_paycheck) + _bonus;" \n
" systemChat format [""Du hast ein Einkommen in h�he von %1 bekommen und einen Bonus vom Staat in h�he von %2."",[(call life_paycheck)] call life_fnc_numberText, [_bonus] call life_fnc_numberText];" \n
" };" \n
" };" \n
" if(playerSide isEqualTo civilian)then{" \n
" //Civilian" \n
" if (call life_fnc_steamName) then{" \n
" hint ""Da du unsere Homepage in unserem Namen stehen hast, bekommst du doppelt so viel Einkommen!"";" \n
" private _paycheck = (call life_paycheck) * 1.5;" \n
" life_atmbank = life_atmbank + _paycheck;" \n
" systemChat format [localize ""STR_FSM_ReceivedPay"",[_paycheck] call life_fnc_numberText];" \n
" }else{" \n
" hint parseText format[""Wenn du <t font='RobotoCondensedBold'>thelastgamer.de</t> in deinen Steam Namen machst, dann bekommst du doppelt so viel einkommen!""];" \n
" life_atmbank = life_atmbank + (call life_paycheck);" \n
" systemChat format [localize ""STR_FSM_ReceivedPay"",[(call life_paycheck)] call life_fnc_numberText];" \n
" };" \n
" };" \n
"};" \n
"" \n
"_lastcheck = time;" \n
"" \n
"//Group clean (Local)" \n
"{" \n
" if (local _x && {(units _x isEqualTo [])}) then {" \n
" deleteGroup _x;" \n
" };" \n
"} forEach allGroups;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
};
initState="Main_Init";
finalStates[] =
{
};
};
/*%FSM</COMPILE>*/
Alles anzeigen
Danach tragt ihr noch in eurer Config_Master folgendes ein.
Spoiler anzeigen
Code
//Polizei Config
class payCheck_Config_cop {
class level_1_cop{
bonus = 500;
multiplikator = 1.5;
};
class level_2_cop{
bonus = 500;
multiplikator = 1.5;
};
class level_3_cop {
bonus = 750;
multiplikator = 1.5;
};
class level_4_cop {
bonus = 750;
multiplikator = 1.5;
};
class level_5_cop {
bonus = 1000;
multiplikator = 1.5;
};
class level_6_cop {
bonus = 1000;
multiplikator = 1.5;
};
class level_7_cop {
bonus = 1250;
multiplikator = 1.5;
};
class level_8_cop {
bonus = 1250;
multiplikator = 1.5;
};
class level_9_cop {
bonus = 1500;
multiplikator = 1.5;
};
class level_10_cop {
bonus = 1500;
multiplikator = 1.5;
};
};
//Medic Config
class payCheck_Config_medic {
class level_1_medic{
bonus = 500;
multiplikator = 1.5;
};
class level_2_medic{
bonus = 500;
multiplikator = 1.5;
};
class level_3_medic{
bonus = 750;
multiplikator = 1.5;
};
class level_4_medic{
bonus = 750;
multiplikator = 1.5;
};
class level_5_medic{
bonus = 1000;
multiplikator = 1.5;
};
class level_6_medic{
bonus = 1000;
multiplikator = 1.5;
};
class level_7_medic{
bonus = 1250;
multiplikator = 1.5;
};
class level_8_medic{
bonus = 1250;
multiplikator = 1.5;
};
class level_9_medic{
bonus = 1500;
multiplikator = 1.5;
};
class level_10_medic{
bonus = 1500;
multiplikator = 1.5;
};
};
//ADAC Config
class payCheck_Config_adac {
class level_1_adac{
bonus = 500;
multiplikator = 1.5;
};
class level_2_adac{
bonus = 500;
multiplikator = 1.5;
};
class level_3_adac{
bonus = 750;
multiplikator = 1.5;
};
class level_4_adac{
bonus = 750;
multiplikator = 1.5;
};
class level_5_adac{
bonus = 1000;
multiplikator = 1.5;
};
class level_6_adac{
bonus = 1000;
multiplikator = 1.5;
};
class level_7_adac{
bonus = 1250;
multiplikator = 1.5;
};
class level_8_adac{
bonus = 1250;
multiplikator = 1.5;
};
class level_9_adac{
bonus = 1500;
multiplikator = 1.5;
};
class level_10_adac{
bonus = 1500;
multiplikator = 1.5;
};
};
Alles anzeigen
Die FSM als SQF Datei damit ihr sie anpassen könnt.
Spoiler anzeigen
Code
/*
author: Risk
description: Adds Steamname check, Bonus Money & Multiplikator
returns: nothing
*/
if (!alive player) then {
systemChat localize "STR_FSM_MissedPay";
} else {
if(playerSide in [west,independent,east])then{
private "_bonus";
private "_multiplikator";
if (playerSide isEqualTo west)then{
//private _payCheckConfig = missionConfigFile >> "Life_Settings" >> "payCheck_Config_cop" >> format["level_%1_cop", call life_coplevel];
_bonus = getNumber (missionConfigFile >> "Life_Settings" >> "payCheck_Config_cop" >> format["level_%1_cop", call life_coplevel] >> "bonus");
_multiplikator = getNumber (missionConfigFile >> "Life_Settings" >> "payCheck_Config_cop" >> format["level_%1_cop", call life_coplevel] >> "multiplikator");
};
if (playerSide isEqualTo independent)then{
//private _payCheckConfig = missionConfigFile >> "Life_Settings" >> "payCheck_Config_medic" >> format["level_%1_medic", call life_mediclevel];
_bonus = getNumber (missionConfigFile >> "Life_Settings" >> "payCheck_Config_medic" >> format["level_%1_medic", call life_mediclevel] >> "bonus");
_multiplikator = getNumber (missionConfigFile >> "Life_Settings" >> "payCheck_Config_medic" >> format["level_%1_medic", call life_mediclevel] >> "multiplikator");
};
if (playerSide isEqualTo east)then{
//private _payCheckConfig = missionConfigFile >> "Life_Settings" >> "payCheck_Config_adac" >> format["level_%1_adac", call life_adaclevel];
_bonus = getNumber (missionConfigFile >> "Life_Settings" >> "payCheck_Config_adac" >> format["level_%1_adac", call life_adaclevel] >> "bonus");
_multiplikator = getNumber (missionConfigFile >> "Life_Settings" >> "payCheck_Config_adac" >> format["level_%1_adac", call life_adaclevel] >> "multiplikator");
};
//Cop,Medic,ADAC
if (call TLG_Client_fnc_steamName) then{
["Da du unsere Homepage in unserem Namen stehen hast, bekommst du doppelt so viel Einkommen!","fast","blue"] spawn TLG_Client_fnc_msgHandle;
private _paycheck = (call life_paycheck) * _multiplikator;
life_atmbank = life_atmbank + _paycheck + _bonus;
systemChat format ["Du hast ein Einkommen in höhe von %1 bekommen und einen Bonus vom Staat in höhe von %2.",[_paycheck] call life_fnc_numberText, [_bonus] call life_fnc_numberText];
}else{
[parseText format["Wenn du <t font='RobotoCondensedBold'>thelastgamer.de</t> in deinen Steam Namen machst, dann bekommst du doppelt so viel einkommen!"],"fast","red"] spawn TLG_Client_fnc_msgHandle;
life_atmbank = life_atmbank + (call life_paycheck) + _bonus;
systemChat format ["Du hast ein Einkommen in höhe von %1 bekommen und einen Bonus vom Staat in höhe von %2.",[(call life_paycheck)] call life_fnc_numberText, [_bonus] call life_fnc_numberText];
};
};
if(playerSide isEqualTo civilian)then{
//Civilian
if (call TLG_Client_fnc_steamName) then{
["Da du unsere Homepage in unserem Namen stehen hast, bekommst du doppelt so viel Einkommen!","fast","blue"] spawn TLG_Client_fnc_msgHandle;
private _paycheck = (call life_paycheck) * 1.5;
life_atmbank = life_atmbank + _paycheck;
systemChat format [localize "STR_FSM_ReceivedPay",[_paycheck] call life_fnc_numberText];
}else{
[parseText format["Wenn du <t font='RobotoCondensedBold'>thelastgamer.de</t> in deinen Steam Namen machst, dann bekommst du doppelt so viel einkommen!"],"fast","red"] spawn TLG_Client_fnc_msgHandle;
life_atmbank = life_atmbank + (call life_paycheck);
systemChat format [localize "STR_FSM_ReceivedPay",[(call life_paycheck)] call life_fnc_numberText];
};
};
};
_lastcheck = time;
//Group clean (Local)
{
if (local _x && {(units _x isEqualTo [])}) then {
deleteGroup _x;
};
} forEach allGroups;
Alles anzeigen