; Password Page Function Steam_IDPage !insertmacro SectionFlagIsSet ${Section2} ${SF_SELECTED} ShowPage SkipPage ShowPage: GetDlgItem $R0 $HWNDPARENT 2 EnableWindow $R0 0|1 # 0=hide, 1=show GetDlgItem $R0 $HWNDPARENT 3 EnableWindow $R0 0|1 # 0=hide, 1=show !insertmacro MUI_HEADER_TEXT "Konfiguration" "Tragen Sie die Administratoren ein." !insertmacro MUI_INSTALLOPTIONS_DISPLAY "steamid.ini" SkipPage: FunctionEnd ; Copy Flag !macro REPLACE FLAG SOURCE Push "${FLAG}" #-- text to be replaced within Push "${SOURCE}" #-- replace with anything Push all #-- replace all occurrences Push all #-- replace all occurrences Push $INSTDIR\cstrike\addons\amxmodx\configs\users.ini #-- file to replace in Call AdvReplaceInFile #-- Call the Function !macroend ; Copy Flag Function CopyFlag ;1 Push $R0 ReadINIStr $R0 "$PLUGINSDIR\steamid.ini" "Field 12" "State" StrCmp $R0 "Steam ID" 0 notSteamID1 !insertmacro REPLACE Flag1 ce notSteamID1: StrCmp $R0 "IP" 0 notIP1 !insertmacro REPLACE Flag1 de notIP1: StrCmp $R0 "Name" 0 done1 !insertmacro REPLACE Flag1 b done1: ;2 ReadINIStr $R0 "$PLUGINSDIR\steamid.ini" "Field 11" "State" StrCmp $R0 "Steam ID" 0 notSteamID2 !insertmacro REPLACE Flag2 ce notSteamID2: StrCmp $R0 "IP" 0 notIP2 !insertmacro REPLACE Flag2 de notIP2: StrCmp $R0 "Name" 0 done2 !insertmacro REPLACE Flag2 b done2: ;3 ReadINIStr $R0 "$PLUGINSDIR\steamid.ini" "Field 10" "State" StrCmp $R0 "Steam ID" 0 notSteamID3 !insertmacro REPLACE Flag3 ce notSteamID3: StrCmp $R0 "IP" 0 notIP3 !insertmacro REPLACE Flag3 de notIP3: StrCmp $R0 "Name" 0 done3 !insertmacro REPLACE Flag3 b done3: FunctionEnd LangString NoSteam_ID ${LANG_GERMAN} "Steam ID/IP/Name" ; Page Leave Feautures Function PageLeaveSteam_ID !insertmacro MUI_INSTALLOPTIONS_READ $R0 "steamid.ini" "Field 7" "State" ${If} $R0 != "" Push "steamid1" #-- text to be replaced within the " " Push "$R0" #-- replace with anything within the " " Push all #-- replace all occurrences Push all #-- replace all occurrences Push $INSTDIR\cstrike\addons\amxmodx\configs\users.ini #-- file to replace in Call AdvReplaceInFile #-- Call the Function ${Else} MessageBox MB_OK|MB_ICONINFORMATION $(NoSteam_ID) Abort ${EndIf} !insertmacro MUI_INSTALLOPTIONS_READ $R0 "steamid.ini" "Field 8" "State" ${If} $R0 != "" Push "steamid2" #-- text to be replaced within the " " Push "$R0" #-- replace with anything within the " " Push all #-- replace all occurrences Push all #-- replace all occurrences Push $INSTDIR\cstrike\addons\amxmodx\configs\users.ini #-- file to replace in Call AdvReplaceInFile #-- Call the Function ${EndIf} !insertmacro MUI_INSTALLOPTIONS_READ $R0 "steamid.ini" "Field 9" "State" ${If} $R0 != "" Push "steamid3" #-- text to be replaced within the " " Push "$R0" #-- replace with anything within the " " Push all #-- replace all occurrences Push all #-- replace all occurrences Push $INSTDIR\cstrike\addons\amxmodx\configs\users.ini #-- file to replace in Call AdvReplaceInFile #-- Call the Function ${EndIf} ReadIniStr $0 '$PLUGINSDIR\steamid.ini' 'Field 12' 'State' ReadIniStr $1 '$PLUGINSDIR\steamid.ini' 'Field 7' 'State' ${Unless} $1 == '' ; if not ${If} $0 == '' MessageBox MB_OK|MB_ICONINFORMATION "Administratortyp" Abort ${EndIf} ${EndIf} ReadIniStr $0 '$PLUGINSDIR\steamid.ini' 'Field 11' 'State' ReadIniStr $1 '$PLUGINSDIR\steamid.ini' 'Field 8' 'State' ${Unless} $1 == '' ; if not ${If} $0 == '' MessageBox MB_OK|MB_ICONINFORMATION "Administratortyp" Abort ${EndIf} ${EndIf} ReadIniStr $0 '$PLUGINSDIR\steamid.ini' 'Field 10' 'State' ReadIniStr $1 '$PLUGINSDIR\steamid.ini' 'Field 9' 'State' ${Unless} $1 == '' ; if not ${If} $0 == '' MessageBox MB_OK|MB_ICONINFORMATION "Administratortyp" Abort ${EndIf} ${EndIf} FunctionEnd